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 System.String[]

Gets built-in, application and custom document properties.

Syntax

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

Examples

Show document properties

Get-OfficeExcelDocumentProperty -Path .\Reports\Q3-Sales.xlsx

Lists the built-in, application and custom properties of a workbook.

Report owners of shared workbooks

Get-ChildItem -Path \\files\Reports -Filter *.xlsx |
                Get-OfficeExcelDocumentProperty -Name Owner, Classification -Kind Custom |
                Format-Table

Reads the custom Owner and Classification properties of every workbook on the share.

Parameters

-Document ExcelDocument optionalpipeline: True (ByValue)sets: Document
Caller-owned workbook; omission uses the enclosing Excel content block.
-Kind ExcelDocumentPropertyKind[] optional
Metadata kind to add.
Possible values: BuiltIn, Application, Custom
-Name String[] optional
Property name filter (wildcards supported).
-Path String[] requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path
Workbook paths resolved with filesystem wildcard support.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal workbook paths, including FileInfo.FullName and provider PSPath.

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.