Cmdlet
Clear-OfficeExcelPageBreak
Clears manual row or column page breaks from an Excel worksheet.
Syntax
Clear-OfficeExcelPageBreak [-All] [-Column <Int32[]>] [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
ContextClear-OfficeExcelPageBreak [-All] [-Column <Int32[]>] [-PassThru] [-Path] <String> [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
PathClear-OfficeExcelPageBreak [-All] [-Column <Int32[]>] -Document <ExcelDocument> [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
DocumentExamples
Remove stale manual page breaks.
Clear-OfficeExcelPageBreak -Path .\Report.xlsx -Sheet Data -Row 25 -Column 8 -Confirm:$false
Get-OfficeExcelPageBreak -Path .\Report.xlsx -Sheet Data |
Format-Table Type, Position, SheetNameRemoves the selected row and column page breaks and saves the workbook.
Parameters
- -All SwitchParameter
- Clear all manual row and column page breaks from selected worksheets.
- -Column Int32[]
- One-based columns whose manual page breaks should be removed.
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Row Int32[]
- One-based rows whose manual page breaks should be removed.
- -Sheet String
- Worksheet name to update. Defaults to the current DSL sheet or all workbook sheets.
- -SheetIndex Int32
- Worksheet index (0-based) to update. Defaults to the current DSL sheet or all workbook sheets.
- -Path String
- Workbook path to update.
- -Document ExcelDocument
- Workbook to update outside the DSL context.
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.