Cmdlet
Set-OfficeExcelOrientation
Sets the page orientation on a worksheet.
Syntax
Set-OfficeExcelOrientation
[-Orientation] <Portrait| Landscape>
[-PassThru]
[<CommonParameters>]#Parameter set:
ContextSet-OfficeExcelOrientation
-Document <ExcelDocument>
[-Orientation] <Portrait| Landscape>
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Switch to landscape orientation.
ExcelSheet 'Data' { Set-OfficeExcelOrientation -Orientation Landscape }Configures the sheet to print in landscape.
Parameters
- -Orientation OfficePageOrientation
- Orientation to apply.
- Possible values:
Portrait,Landscape - -PassThru SwitchParameter
- Emit the worksheet after applying the orientation.
- -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.