OfficeIMO

API Reference

Command

Get-OfficeExcel

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Opens an existing Excel workbook.

Remarks

Opens an existing Excel workbook.

Examples

Load a workbook in read-only mode.


PS>$workbook = Get-OfficeExcel -Path .\report.xlsx -ReadOnly
        

Loads report.xlsx for inspection without enabling writes.

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-OfficeExcel [-AutoSave] -InputPath <String> [-ReadOnly] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoSave SwitchParameter optionalposition: namedpipeline: False
Enable automatic saves on the underlying document.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the workbook to load.
ReadOnly SwitchParameter optionalposition: namedpipeline: False
Open the file in read-only mode.

Outputs

System.Object