Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelPageBreak

Module
PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument System.String[]
Outputs
PSWriteOffice.Models.Excel.ExcelPageBreakInfo

Lists manual print page breaks without changing a workbook.

Syntax

Get-OfficeExcelPageBreak
[-Column]
[-Document <ExcelDocument>]
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeExcelPageBreak
[-Column]
[-Path] <String[]>
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelPageBreak
[-Column]
-LiteralPath <String[]>
[-Row]
[-Sheet <OfficeSheetSelector[]>]
[<CommonParameters>]
#
Parameter set: LiteralPath

Examples

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.xlsx

Shows the manual row and column page breaks of every sheet.

Check row breaks on one sheet

Get-OfficeExcelPageBreak -Path .\Reports\Inventory.xlsx -Sheet Servers -Row

Lists only the row breaks of the Servers sheet before the report is sent to print.

Parameters

-Column SwitchParameter optional
Include column breaks; neither switch or both switches includes both kinds.
-Document ExcelDocument optionalpipeline: True (ByValue)sets: Document
Caller-owned workbook; omission uses the enclosing Excel content block.
-Row SwitchParameter optional
Include row breaks; neither switch or both switches includes both kinds.
-Sheet OfficeSheetSelector[] optionalaliases: WorksheetName
Worksheet names, wildcard patterns, one-based positions or native worksheet objects.
-Path String[] requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path
Workbook paths, including filesystem wildcard patterns.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
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.