Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
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

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.