API Reference
Command
Set-OfficeExcelPageSetup
Configures page setup options on a worksheet.
Remarks
Configures page setup options on a worksheet.
Examples
Fit to one page wide.
PS>ExcelSheet 'Data' { Set-OfficeExcelPageSetup -FitToWidth 1 -FitToHeight 0 }
Fits the sheet to one page wide and unlimited height.
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
Set-OfficeExcelPageSetup [-FitToHeight <Nullable`1>] [-FitToWidth <Nullable`1>] [-PassThru] [-Scale <Nullable`1>] [<CommonParameters>]#Parameter set:
ContextParameters
- FitToHeight Nullable`1
- Number of pages to fit vertically.
- FitToWidth Nullable`1
- Number of pages to fit horizontally.
- PassThru SwitchParameter
- Emit the worksheet after applying settings.
- Scale Nullable`1
- Manual scale percentage (10-400).
Outputs
System.Object
Set-OfficeExcelPageSetup -Document <ExcelDocument> [-FitToHeight <Nullable`1>] [-FitToWidth <Nullable`1>] [-PassThru] [-Scale <Nullable`1>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- FitToHeight Nullable`1
- Number of pages to fit vertically.
- FitToWidth Nullable`1
- Number of pages to fit horizontally.
- PassThru SwitchParameter
- Emit the worksheet after applying settings.
- Scale Nullable`1
- Manual scale percentage (10-400).
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
Outputs
System.Object