Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Remove-OfficeNotebookCell

Module
PSWriteOffice
Inputs
OfficeIMO.Notebook.NotebookDocument
Outputs
OfficeIMO.Notebook.NotebookDocument

Removes a cell from a live notebook.

Syntax

Remove-OfficeNotebookCell
-Document <NotebookDocument>
[-Index] <Int32>
[-PassThru]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Preview removal of the first cell.

$notebook | Remove-OfficeNotebookCell -Index 0 -WhatIf

Parameters

-Document NotebookDocument requiredpipeline: True (ByValue)
Live notebook containing the cell.
-Index Int32 requiredposition: 0
Zero-based position of the cell to remove.
-PassThru SwitchParameter optional
Return the updated document.

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.