Cmdlet
Set-OfficeNotebookCell
Updates cell text or a saved code-cell execution count without running code.
Syntax
Set-OfficeNotebookCell
-Cell <NotebookCell>
[-ExecutionCount <Int32>]
[-PassThru]
[-Source <String>]
[<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Replace one cell's source and clear its execution count.
$notebook | Get-OfficeNotebookCell -Index 1 | Set-OfficeNotebookCell -Source 'Get-Date' -ExecutionCount $nullParameters
- -Cell NotebookCell
- Cell to edit. Keep its notebook open until the edit is complete.
- -ExecutionCount Int32
- Saved execution count for a code cell. Supply $null to clear it.
- -PassThru SwitchParameter
- Return the updated cell.
- -Source String
- Replacement cell text.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.