API Reference
Command
Set-OfficeExcelOrientation
Sets the page orientation on a worksheet.
Remarks
Sets the page orientation on a worksheet.
Examples
Switch to landscape orientation.
PS>ExcelSheet 'Data' { Set-OfficeExcelOrientation -Orientation Landscape }
Configures the sheet to print in landscape.
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-OfficeExcelOrientation -Orientation <Portrait|Landscape> [-PassThru] [<CommonParameters>]#Parameter set:
ContextParameters
- Orientation ExcelPageOrientation
- Orientation to apply.
- Possible values:
Portrait,Landscape - PassThru SwitchParameter
- Emit the worksheet after applying the orientation.
Outputs
System.Object
Set-OfficeExcelOrientation -Document <ExcelDocument> -Orientation <Portrait|Landscape> [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- Orientation ExcelPageOrientation
- Orientation to apply.
- Possible values:
Portrait,Landscape - PassThru SwitchParameter
- Emit the worksheet after applying the orientation.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
Outputs
System.Object