Cmdlet
Set-OfficeExcelPrintTitles
Sets or clears repeating print title rows and columns for a worksheet.
Syntax
Set-OfficeExcelPrintTitles [-Clear] [-FirstColumn <Int32>] [-FirstRow <Int32>] [-LastColumn <Int32>] [-LastRow <Int32>] [-PassThru] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
ContextSet-OfficeExcelPrintTitles [-Clear] [-FirstColumn <Int32>] [-FirstRow <Int32>] [-LastColumn <Int32>] [-LastRow <Int32>] [-PassThru] [-Path] <String> [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
PathSet-OfficeExcelPrintTitles [-Clear] -Document <ExcelDocument> [-FirstColumn <Int32>] [-FirstRow <Int32>] [-LastColumn <Int32>] [-LastRow <Int32>] [-PassThru] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
DocumentExamples
Repeat report headers on every printed page.
$proof = @(
Set-OfficeExcelPrintTitles -Path .\Report.xlsx -Sheet Data -FirstRow 1 -LastRow 1 -FirstColumn 1 -LastColumn 1
Get-OfficeExcelSummary -Path .\Report.xlsx |
Select-Object -Property SheetCount, TableCount
)
$proofStores Excel print titles for the Data worksheet and then reads back workbook structure as a quick proof step.
Parameters
- -Clear SwitchParameter
- Clear existing print titles for the worksheet.
- -FirstColumn Int32
- First 1-based column to repeat.
- -FirstRow Int32
- First 1-based row to repeat.
- -LastColumn Int32
- Last 1-based column to repeat.
- -LastRow Int32
- Last 1-based row to repeat.
- -PassThru SwitchParameter
- Emit the worksheet after setting print titles.
- -Sheet String
- Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
- -SheetIndex Int32
- Worksheet index when using a workbook object or path.
- -Path String
- Workbook path to update.
- -Document ExcelDocument
- Workbook to update 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.