Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficeExcelSheetView

Aliases: ExcelSheetView
Module
PSWriteOffice
Aliases
ExcelSheetView
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
OfficeIMO.Excel.ExcelSheet

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

Description

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 optionalpipeline: True (ByValue)
Gets or sets an explicit live document; omission uses the enclosing content block.
-FreezeColumns Int32 optional
Gets or sets the number of frozen left columns; omission preserves the current column count.
-FreezeRows Int32 optional
Gets or sets the number of frozen top rows; omission preserves the current row count.
-NoGridlines SwitchParameter optional
Gets or sets whether gridlines are hidden; explicitly false shows them.
-PassThru SwitchParameter optional
Gets or sets whether to emit the edited native worksheet.
-RightToLeft SwitchParameter optional
Gets or sets right-to-left layout; explicitly false restores left-to-right.
-Sheet OfficeSheetSelector optional
Gets or sets a worksheet name, one-based position or native worksheet.
-View ExcelWorksheetViewKind optional
Gets or sets the worksheet view mode.
Possible values: Normal, PageBreakPreview, PageLayout
-Zoom UInt32 optional
Gets or sets the current zoom percentage from 10 to 400.
-ZoomNormal UInt32 optional
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.