Cmdlet
Get-OfficeExcelDocumentProperty
Gets built-in and application document properties from an Excel workbook.
Syntax
Get-OfficeExcelDocumentProperty [-Application] [-BuiltIn] [-Custom] [-Name <String[]>] [-Path] <String> [<CommonParameters>]#Parameter set:
PathGet-OfficeExcelDocumentProperty [-Application] [-BuiltIn] [-Custom] -Document <ExcelDocument> [-Name <String[]>] [<CommonParameters>]#Parameter set:
DocumentExamples
Audit workbook metadata before publishing a report.
$properties = Get-OfficeExcelDocumentProperty -Path .\Report.xlsx -Name Title,Company,Department
$properties |
Format-Table Name, Value, ScopeReturns matching built-in, application, and custom workbook properties as structured objects.
Parameters
- -Application SwitchParameter
- Only return application properties such as Company and Manager.
- -BuiltIn SwitchParameter
- Only return core package properties.
- -Custom SwitchParameter
- Only return custom workbook properties.
- -Name String[]
- Property name filter (wildcards supported).
- -Path String
- Path to the workbook.
- -Document ExcelDocument
- 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.