API Reference

Cmdlet

Get-OfficeExcelDocumentProperty

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

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

Remarks

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

Examples

Authored help example

Audit workbook metadata before publishing a report.

PS>


$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.

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-OfficeExcelDocumentProperty [-Application] [-BuiltIn] [-Custom] -InputPath <String> [-Name <String[]>] [<CommonParameters>]
#
Parameter set: Path

Parameters

Application SwitchParameter optionalposition: namedpipeline: False
Only return application properties such as Company and Manager.
BuiltIn SwitchParameter optionalposition: namedpipeline: False
Only return core package properties.
Custom SwitchParameter optionalposition: namedpipeline: False
Only return custom workbook properties.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the workbook.
Name String[] optionalposition: namedpipeline: False
Property name filter (wildcards supported).

Outputs

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

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

Parameters

Application SwitchParameter optionalposition: namedpipeline: False
Only return application properties such as Company and Manager.
BuiltIn SwitchParameter optionalposition: namedpipeline: False
Only return core package properties.
Custom SwitchParameter optionalposition: namedpipeline: False
Only return custom workbook properties.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect.
Name String[] optionalposition: namedpipeline: False
Property name filter (wildcards supported).

Outputs

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