Cmdlet
Get-OfficeExcelTemplateMarker
Lists template markers and, with -Value, which are bound.
Syntax
Get-OfficeExcelTemplateMarker
[-Document <ExcelDocument>]
[-MissingOnly]
[-Sheet <OfficeSheetSelector[]>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
DocumentGet-OfficeExcelTemplateMarker
[-MissingOnly]
[-Path] <String[]>
[-Sheet <OfficeSheetSelector[]>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelTemplateMarker
-LiteralPath <String[]>
[-MissingOnly]
[-Sheet <OfficeSheetSelector[]>]
[-Value <Hashtable>]
[<CommonParameters>]#Parameter set:
LiteralPathExamples
List the markers in a template
Get-OfficeExcelTemplateMarker -Path .\Templates\Service-Report.xltxShows every {{Marker}} in the template with its sheet and cell.
Find markers your data does not fill
$values = @{ Client = 'Northwind Traders'; Month = 'October 2026' }
Get-OfficeExcelTemplateMarker -Path .\Templates\Service-Report.xltx -Value $values -MissingOnly |
Select-Object SheetName, CellReference, NameCompares the template with the values a script is about to supply and lists only the markers that would stay unfilled.
Parameters
- -Document ExcelDocument
- Caller-owned workbook; omission uses the enclosing Excel content block.
- -MissingOnly SwitchParameter
- Only returns markers that are not supplied by -Value.
- -Sheet OfficeSheetSelector[]
- Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.
- -Value Hashtable
- Value or values consumed by the selected operation.
- -Path String[]
- Workbook paths resolved with filesystem wildcard support.
- -LiteralPath String[]
- Literal workbook paths, including FileInfo.FullName and provider PSPath.
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.