API Reference

Cmdlet

Clear-OfficeExcelPageBreak

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

Clears manual row or column page breaks from an Excel worksheet.

Remarks

Clears manual row or column page breaks from an Excel worksheet.

Examples

Authored help example

Remove stale manual page breaks.

PS>


Clear-OfficeExcelPageBreak -Path .\Report.xlsx -Sheet Data -Row 25 -Column 8 -Confirm:$false
            Get-OfficeExcelPageBreak -Path .\Report.xlsx -Sheet Data |
                Format-Table Type, Position, SheetName
        

Removes the selected row and column page breaks and saves the workbook.

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

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

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Clear all manual row and column page breaks from selected worksheets.
Column Int32[] optionalposition: namedpipeline: False
One-based columns whose manual page breaks should be removed.
Row Int32[] optionalposition: namedpipeline: False
One-based rows whose manual page breaks should be removed.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name to update. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to update. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Object

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

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Clear all manual row and column page breaks from selected worksheets.
Column Int32[] optionalposition: namedpipeline: False
One-based columns whose manual page breaks should be removed.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path to update.
Row Int32[] optionalposition: namedpipeline: False
One-based rows whose manual page breaks should be removed.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name to update. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to update. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Object

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

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Clear all manual row and column page breaks from selected worksheets.
Column Int32[] optionalposition: namedpipeline: False
One-based columns whose manual page breaks should be removed.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to update outside the DSL context.
Row Int32[] optionalposition: namedpipeline: False
One-based rows whose manual page breaks should be removed.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name to update. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to update. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Object