Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Get-OfficeExcelTemplateMarker

Aliases: ExcelTemplateMarkers
Namespace PSWriteOffice
Aliases
ExcelTemplateMarkers
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Lists Excel template markers such as {{Name}} and optionally shows whether supplied values bind to them.

Remarks

Lists Excel template markers such as {{Name}} and optionally shows whether supplied values bind to them.

Examples

Authored help example

Inspect template markers before filling a workbook.

PS>


Get-OfficeExcelTemplateMarker -Path .\Invoice.xlsx -Sheet Invoice -Value @{ Number = 'INV-001'; Total = 123.45 }
        

Returns one object per marker with address, format, and binding metadata.

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-OfficeExcelTemplateMarker [-MissingOnly] [-Sheet <String>] [-SheetIndex <Int32>] [-Value <Hashtable>] [<CommonParameters>]
#
Parameter set: Context

Parameters

MissingOnly SwitchParameter optionalposition: namedpipeline: False
Only returns markers that are not supplied by -Value.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
Value Hashtable optionalposition: namedpipeline: Falsealiases: Values
Optional marker values used to report which markers are bound and which are still missing.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelTemplateMarker [-MissingOnly] -Path <String> [-Sheet <String>] [-SheetIndex <Int32>] [-Value <Hashtable>] [<CommonParameters>]
#
Parameter set: Path

Parameters

MissingOnly SwitchParameter optionalposition: namedpipeline: False
Only returns markers that are not supplied by -Value.
Path String requiredposition: 0pipeline: Falsealiases: FilePath, InputPath
Workbook path to inspect.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
Value Hashtable optionalposition: namedpipeline: Falsealiases: Values
Optional marker values used to report which markers are bound and which are still missing.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelTemplateMarker -Document <ExcelDocument> [-MissingOnly] [-Sheet <String>] [-SheetIndex <Int32>] [-Value <Hashtable>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect outside the DSL context.
MissingOnly SwitchParameter optionalposition: namedpipeline: False
Only returns markers that are not supplied by -Value.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
Value Hashtable optionalposition: namedpipeline: Falsealiases: Values
Optional marker values used to report which markers are bound and which are still missing.

Outputs

System.Management.Automation.PSObject