API Reference
Cmdlet
Add-OfficeExcelPageBreak
Adds manual row or column page breaks to an Excel worksheet.
Remarks
Adds manual row or column page breaks to an Excel worksheet.
Examples
Example 1: 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:
ContextParameters
- Column Int32[]
- One-based columns after which manual page breaks should be inserted.
- PassThru SwitchParameter
- Emit page-break records after adding them.
- Row Int32[]
- One-based rows after which manual page breaks should be inserted.
- Sheet String
- Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
- SheetIndex Nullable`1
- Worksheet index when using a workbook object or path.
Add-OfficeExcelPageBreak [-Column <Int32[]>] -InputPath <String> [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]#Parameter set:
PathParameters
- Column Int32[]
- One-based columns after which manual page breaks should be inserted.
- InputPath String
- Workbook path to update.
- PassThru SwitchParameter
- Emit page-break records after adding them.
- Row Int32[]
- One-based rows after which manual page breaks should be inserted.
- Sheet String
- Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
- SheetIndex Nullable`1
- Worksheet index when using a workbook object or path.
Add-OfficeExcelPageBreak [-Column <Int32[]>] -Document <ExcelDocument> [-PassThru] [-Row <Int32[]>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Column Int32[]
- One-based columns after which manual page breaks should be inserted.
- Document ExcelDocument
- Workbook to update outside the DSL context.
- PassThru SwitchParameter
- Emit page-break records after adding them.
- Row Int32[]
- One-based rows after which manual page breaks should be inserted.
- Sheet String
- Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
- SheetIndex Nullable`1
- Worksheet index when using a workbook object or path.