Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelPageBreak

Aliases: ExcelPageBreaks
Module PSWriteOffice
Aliases
ExcelPageBreaks
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Gets manual row and column page breaks from Excel worksheets.

Syntax

Get-OfficeExcelPageBreak [-Column] [-Row] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Context
Get-OfficeExcelPageBreak [-Column] [-Path] <String> [-Row] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelPageBreak [-Column] -Document <ExcelDocument> [-Row] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

List manual print page breaks.

$breaks = Get-OfficeExcelPageBreak -Path .\Report.xlsx -Sheet Data
$breaks |
    Sort-Object Type, Position

Returns row and column page-break records for print-layout audits.

Parameters

-Column SwitchParameter optional
Only return column page breaks.
-Row SwitchParameter optional
Only return row page breaks.
-Sheet String optionalaliases: WorksheetName
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
-SheetIndex Int32 optional
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Workbook path to inspect.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
Workbook to inspect 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.