API Reference

Cmdlet

Get-OfficeExcelWorksheetView

Aliases: ExcelWorksheetView
Namespace PSWriteOffice
Aliases
ExcelWorksheetView
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Gets worksheet view settings such as frozen panes and gridline visibility.

Remarks

Gets worksheet view settings such as frozen panes and gridline visibility.

Examples

Authored help example

Inspect worksheet view settings.

PS>


$views = Get-OfficeExcelWorksheetView -Path .\Report.xlsx
            $views |
                Format-Table SheetName, FrozenRowCount, FrozenColumnCount, ShowGridlines, ZoomScale
        

Returns view metadata useful for workbook audits and maintenance scripts.

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

Get-OfficeExcelWorksheetView [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelWorksheetView -InputPath <String> [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Path

Parameters

InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path to inspect.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelWorksheetView -Document <ExcelDocument> [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect outside the DSL context.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.

Outputs

System.Management.Automation.PSObject