API Reference

Cmdlet

Add-OfficeExcelPageBreak

Aliases: ExcelPageBreak
Namespace PSWriteOffice
Aliases
ExcelPageBreak
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Adds manual row or column page breaks to an Excel worksheet.

Remarks

Adds manual row or column page breaks to an Excel worksheet.

Examples

Authored help example

Insert print page breaks for report sections.

PS>


ExcelSheet 'Data' { Add-OfficeExcelPageBreak -Row 25,50 -Column 8 }
        

Adds row page breaks after rows 25 and 50 and a column page break after column 8.

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.

Syntax

Add-OfficeExcelPageBreak [-Column <Int32[]>] [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Column Int32[] optionalposition: namedpipeline: False
One-based columns after which manual page breaks should be inserted.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit page-break records after adding them.
Row Int32[] optionalposition: namedpipeline: False
One-based rows after which manual page breaks should be inserted.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Object

Add-OfficeExcelPageBreak [-Column <Int32[]>] -InputPath <String> [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Path

Parameters

Column Int32[] optionalposition: namedpipeline: False
One-based columns after which manual page breaks should be inserted.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path to update.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit page-break records after adding them.
Row Int32[] optionalposition: namedpipeline: False
One-based rows after which manual page breaks should be inserted.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Object

Add-OfficeExcelPageBreak [-Column <Int32[]>] -Document <ExcelDocument> [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Column Int32[] optionalposition: namedpipeline: False
One-based columns after which manual page breaks should be inserted.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to update outside the DSL context.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit page-break records after adding them.
Row Int32[] optionalposition: namedpipeline: False
One-based rows after which manual page breaks should be inserted.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Object