OfficeIMO

API Reference

Command

Set-OfficeExcelOrientation

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

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: Context

Parameters

Orientation ExcelPageOrientation requiredposition: 0pipeline: Falsevalues: 2
Orientation to apply.
Possible values: Portrait, Landscape
PassThru SwitchParameter optionalposition: namedpipeline: False
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: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to operate on outside the DSL context.
Orientation ExcelPageOrientation requiredposition: 0pipeline: Falsevalues: 2
Orientation to apply.
Possible values: Portrait, Landscape
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after applying the orientation.
Sheet String optionalposition: namedpipeline: False
Worksheet name when using Document.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) when using Document.

Outputs

System.Object