API Reference

Cmdlet

Get-OfficeExcel

Opens an existing Excel workbook.

Remarks

Returns the underlying ExcelDocument so callers can inspect or reuse it in DSL pipelines.

Examples

Authored help example

Example 1: 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> [-Password <String>] [-ReadOnly] [<CommonParameters>]
#
Parameter set: Path

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.
Password String optionalposition: namedpipeline: False
Password used to open an encrypted workbook package.
ReadOnly SwitchParameter optionalposition: namedpipeline: False
Open the file in read-only mode.
Get-OfficeExcel [-AllowHttp] [-AutoSave] [-Password <String>] [-ReadOnly] -Uri <Uri> [<CommonParameters>]
#
Parameter set: Uri

Parameters

AllowHttp SwitchParameter optionalposition: namedpipeline: False
Allow HTTP workbook downloads in addition to HTTPS.
AutoSave SwitchParameter optionalposition: namedpipeline: False
Enable automatic saves on the underlying document.
Password String optionalposition: namedpipeline: False
Password used to open an encrypted workbook package.
ReadOnly SwitchParameter optionalposition: namedpipeline: False
Open the file in read-only mode.
Uri Uri requiredposition: 0pipeline: Falsealiases: Url
Remote workbook URI to load.