Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Get-OfficeExcel

Module
PSWriteOffice
Inputs
None

Opens an existing Excel workbook.

Syntax

Get-OfficeExcel
[-Password <String>]
[-Path] <String>
[-ReadOnly]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcel
[-AllowHttp]
[-Password <String>]
[-ReadOnly]
[-Uri] <Uri>
[<CommonParameters>]
#
Parameter set: Uri

Description

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

Examples

Load a workbook in read-only mode.

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

Loads report.xlsx for inspection without enabling writes.

Parameters

-Password String optional
Password used to open an encrypted workbook package.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Path to the workbook to load.
-ReadOnly SwitchParameter optional
Open the file in read-only mode.
-AllowHttp SwitchParameter optionalsets: Uri
Allow HTTP workbook downloads in addition to HTTPS.
-Uri Uri requiredposition: 0aliases: Urlsets: Uri
Remote workbook URI to load.

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.