Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelDocumentProperty

Module PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
PSWriteOffice.Models.Excel.ExcelDocumentPropertyInfo

Gets built-in and application document properties from an Excel workbook.

Syntax

Get-OfficeExcelDocumentProperty [-Application] [-BuiltIn] [-Custom] [-Name <String[]>] [-Path] <String> [<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelDocumentProperty [-Application] [-BuiltIn] [-Custom] -Document <ExcelDocument> [-Name <String[]>] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

Audit workbook metadata before publishing a report.

$properties = Get-OfficeExcelDocumentProperty -Path .\Report.xlsx -Name Title,Company,Department
$properties |
    Format-Table Name, Value, Scope

Returns matching built-in, application, and custom workbook properties as structured objects.

Parameters

-Application SwitchParameter optional
Only return application properties such as Company and Manager.
-BuiltIn SwitchParameter optional
Only return core package properties.
-Custom SwitchParameter optional
Only return custom workbook properties.
-Name String[] optional
Property name filter (wildcards supported).
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Path to the workbook.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
Workbook to inspect.

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.

Outputs

PSWriteOffice.Models.Excel.ExcelDocumentPropertyInfo: Represents an Excel document property exposed to PowerShell.