API Reference
Cmdlet
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 <UInt32>] [-FitToWidth <UInt32>] [-PageOrder <DownThenOver|OverThenDown>] [-PassThru] [-Scale <UInt32>] [<CommonParameters>]#Parameter set:
ContextParameters
- FitToHeight UInt32
- Number of pages to fit vertically.
- FitToWidth UInt32
- Number of pages to fit horizontally.
- PageOrder ExcelPageOrder
- Multi-page print order.
- Possible values:
DownThenOver,OverThenDown - PassThru SwitchParameter
- Emit the worksheet after applying settings.
- Scale UInt32
- Manual scale percentage (10-400).
Set-OfficeExcelPageSetup -Document <ExcelDocument> [-FitToHeight <UInt32>] [-FitToWidth <UInt32>] [-PageOrder <DownThenOver|OverThenDown>] [-PassThru] [-Scale <UInt32>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- FitToHeight UInt32
- Number of pages to fit vertically.
- FitToWidth UInt32
- Number of pages to fit horizontally.
- PageOrder ExcelPageOrder
- Multi-page print order.
- Possible values:
DownThenOver,OverThenDown - PassThru SwitchParameter
- Emit the worksheet after applying settings.
- Scale UInt32
- Manual scale percentage (10-400).
- Sheet String
- Worksheet name when using Document.
- SheetIndex Int32
- Worksheet index (0-based) when using Document.