Cmdlet
Get-OfficeExcelTemplateMarker
Lists Excel template markers such as {{Name}} and optionally shows whether supplied values bind to them.
Syntax
Get-OfficeExcelTemplateMarker
[-MissingOnly]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
ContextGet-OfficeExcelTemplateMarker
[-MissingOnly]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelTemplateMarker
-Document <ExcelDocument>
[-MissingOnly]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Inspect template markers before filling a workbook.
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.
Parameters
- -MissingOnly SwitchParameter
- Only returns markers that are not supplied by -Value.
- -Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- -SheetIndex Int32
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- -Value Hashtable
- Optional marker values used to report which markers are bound and which are still missing.
- -Path String
- Workbook path to inspect.
- -Document ExcelDocument
- Workbook to inspect outside the 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.