API Reference

Cmdlet

Set-OfficeExcelDocumentProperty

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

Sets a built-in or application document property on an Excel workbook.

Remarks

Sets a built-in or application document property on an Excel workbook.

Examples

Authored help example

Stamp publishing metadata while creating a workbook.

PS>


New-OfficeExcel -Path .\Report.xlsx {
                Set-OfficeExcelDocumentProperty -Name Title -Value 'Operational dashboard'
                Set-OfficeExcelDocumentProperty -Name Department -Value 'Operations' -Custom
            }
        

Updates built-in or custom workbook properties through the current Excel DSL context.

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

Set-OfficeExcelDocumentProperty [-Custom] [-Document <ExcelDocument>] -Name <String> [-PassThru] [-Value <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Custom SwitchParameter optionalposition: namedpipeline: False
Treat the property as a custom workbook property.
Document ExcelDocument optionalposition: namedpipeline: True (ByValue)
Workbook to update when provided explicitly.
Name String requiredposition: 0pipeline: False
Property name to update.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated workbook.
Value Object optionalposition: 1pipeline: False
Property value.

Outputs

OfficeIMO.Excel.ExcelDocument