Cmdlet
Get-OfficeExcelPageBreak
Lists manual print page breaks without changing a workbook.
Syntax
Get-OfficeExcelPageBreak
[-Column]
[-Document <ExcelDocument>]
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]#Parameter set:
DocumentGet-OfficeExcelPageBreak
[-Column]
[-Path] <String[]>
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelPageBreak
[-Column]
-LiteralPath <String[]>
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]#Parameter set:
LiteralPathExamples
List page breaks in literal workbook files.
Get-ChildItem ./Reports -Filter *.xlsx | Get-OfficeExcelPageBreak -Sheet 'Report*'List manual page breaks
Get-OfficeExcelPageBreak -Path .\Reports\Inventory.xlsxShows the manual row and column page breaks of every sheet.
Check row breaks on one sheet
Get-OfficeExcelPageBreak -Path .\Reports\Inventory.xlsx -Sheet Servers -RowLists only the row breaks of the Servers sheet before the report is sent to print.
Parameters
- -Column SwitchParameter
- Include column breaks; neither switch or both switches includes both kinds.
- -Document ExcelDocument
- Caller-owned workbook; omission uses the enclosing Excel content block.
- -Row SwitchParameter
- Include row breaks; neither switch or both switches includes both kinds.
- -Sheet OfficeSheetSelector[]
- Worksheet names, wildcard patterns, one-based positions or native worksheet objects.
- -Path String[]
- Workbook paths, including filesystem wildcard patterns.
- -LiteralPath String[]
- Literal workbook paths. FileInfo.FullName and provider PSPath bind here.
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.