Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Clear-OfficeNotebookOutput

Module
PSWriteOffice
Inputs
OfficeIMO.Notebook.NotebookCell
Outputs
OfficeIMO.Notebook.NotebookCell

Clears saved results from a code cell, optionally including its execution count.

Syntax

Clear-OfficeNotebookOutput
-Cell <NotebookCell>
[-ExecutionCount]
[-PassThru]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Clear all saved results before sharing a notebook.

$notebook | Get-OfficeNotebookCell -Kind Code | Clear-OfficeNotebookOutput -ExecutionCount

Parameters

-Cell NotebookCell requiredpipeline: True (ByValue)
Code cell containing the saved results.
-ExecutionCount SwitchParameter optional
Also clear the code cell's saved execution count.
-PassThru SwitchParameter optional
Return the updated cell.

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.