Cmdlet
Set-OfficeExcelSheetView
Sets frozen panes, gridlines, direction, zoom and view mode for a worksheet.
Syntax
Set-OfficeExcelSheetView
[-Document <ExcelDocument>]
[-FreezeColumns <Int32>]
[-FreezeRows <Int32>]
[-NoGridlines]
[-PassThru]
[-RightToLeft]
[-Sheet <OfficeSheetSelector>]
[-View <Normal| PageBreakPreview| PageLayout>]
[-Zoom <UInt32>]
[-ZoomNormal <UInt32>]
[<CommonParameters>]#Parameter set:
DefaultDescription
Omitted settings keep their values; explicitly false switches reverse their setting. Set both frozen dimensions to zero to unfreeze the sheet.
Examples
Keep report headers and labels visible.
ExcelSheet 'Dashboard' { ExcelSheetView -FreezeRows 3 -FreezeColumns 1 -NoGridlines -Zoom 85 }Parameters
- -Document ExcelDocument
- Gets or sets an explicit live document; omission uses the enclosing content block.
- -FreezeColumns Int32
- Gets or sets the number of frozen left columns; omission preserves the current column count.
- -FreezeRows Int32
- Gets or sets the number of frozen top rows; omission preserves the current row count.
- -NoGridlines SwitchParameter
- Gets or sets whether gridlines are hidden; explicitly false shows them.
- -PassThru SwitchParameter
- Gets or sets whether to emit the edited native worksheet.
- -RightToLeft SwitchParameter
- Gets or sets right-to-left layout; explicitly false restores left-to-right.
- -Sheet OfficeSheetSelector
- Gets or sets a worksheet name, one-based position or native worksheet.
- -View ExcelWorksheetViewKind
- Gets or sets the worksheet view mode.
- Possible values:
Normal,PageBreakPreview,PageLayout - -Zoom UInt32
- Gets or sets the current zoom percentage from 10 to 400.
- -ZoomNormal UInt32
- Gets or sets the normal-view zoom percentage from 10 to 400.
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.