Cmdlet
Set-OfficeExcelPageSetup
Configures page setup options on a worksheet.
Syntax
Set-OfficeExcelPageSetup
[-FitToHeight <UInt32>]
[-FitToWidth <UInt32>]
[-PageOrder <DownThenOver| OverThenDown>]
[-PassThru]
[-Scale <UInt32>]
[<CommonParameters>]#Parameter set:
ContextSet-OfficeExcelPageSetup
-Document <ExcelDocument>
[-FitToHeight <UInt32>]
[-FitToWidth <UInt32>]
[-PageOrder <DownThenOver| OverThenDown>]
[-PassThru]
[-Scale <UInt32>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Fit to one page wide.
ExcelSheet 'Data' { Set-OfficeExcelPageSetup -FitToWidth 1 -FitToHeight 0 }Fits the sheet to one page wide and unlimited height.
Parameters
- -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).
- -Document ExcelDocument
- Workbook to operate on outside the DSL context.
- -Sheet String
- Worksheet name when using Document.
- -SheetIndex Int32
- Worksheet index (0-based) when using Document.
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.