Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Remove-OfficeExcelPageBreak

Module
PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
PSWriteOffice.Models.Excel.ExcelPageBreakInfo

Removes manual print page breaks from selected open worksheets.

Syntax

Remove-OfficeExcelPageBreak
[-All]
[-Column <Int32[]>]
[-Document <ExcelDocument>]
[-PassThru]
[-Row <Int32[]>]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Clear manual breaks from report sheets before saving.

Open-OfficeExcel -Path ./Report.xlsx { Remove-OfficeExcelPageBreak -Sheet 'Report*' -All }

Parameters

-All SwitchParameter optional
Remove every manual row and column break on the selected worksheets.
-Column Int32[] optional
One-based columns whose manual breaks are removed.
-Document ExcelDocument optionalpipeline: True (ByValue)
Gets or sets an explicit live document; omission uses the enclosing content block.
-PassThru SwitchParameter optional
Emit a snapshot for each break actually removed.
-Row Int32[] optional
One-based rows whose manual breaks are removed.
-Sheet OfficeSheetSelector[] optional
Worksheet names, wildcard patterns, one-based positions or native worksheets.

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.

Outputs

PSWriteOffice.Models.Excel.ExcelPageBreakInfo: A manual print page-break snapshot that remains readable after its source workbook is closed.