# Test-OfficeExcelTemplateBinding

Validates Excel template markers against supplied bindings before applying a template.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: ExcelTemplateBinding, ExcelTemplateValidate

**Module**

`PSWriteOffice`

**Aliases**

`ExcelTemplateBinding` `ExcelTemplateValidate`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Management.Automation.PSObject` `System.String` `System.Boolean`

**Source**

[TestOfficeExcelTemplateBindingCommand.cs:26](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/TestOfficeExcelTemplateBindingCommand.cs#L26) 

Validates Excel template markers against supplied bindings before applying a template.

## Syntax

```
Test-OfficeExcelTemplateBinding
[-AsMarkdown]
-Binding <IDictionary>
[-Path] <String>
[-Quiet]
[-ThrowOnMissing]
[<CommonParameters>]
```

[#](#method-test-officeexceltemplatebinding-switchparameter-idictionary-string-switchparameter-switchparameter)

Parameter set: `Path`

```
Test-OfficeExcelTemplateBinding
[-AsMarkdown]
-Binding <IDictionary>
-Document <ExcelDocument>
[-Quiet]
[-ThrowOnMissing]
[<CommonParameters>]
```

[#](#method-test-officeexceltemplatebinding-switchparameter-idictionary-exceldocument-switchparameter-switchparameter)

Parameter set: `Document`

## Examples

### Fail fast when a template workbook is missing required values.

```powershell
$bindings = @{
    CustomerName = 'Northwind'
    InvoiceDate  = Get-Date
    Total        = 1250.75
}
$result = Test-OfficeExcelTemplateBinding -Path .\InvoiceTemplate.xlsx -Binding $bindings -AsMarkdown
$result | Set-Content .\InvoiceTemplateBinding.md
```

Uses OfficeIMO template inspection and returns either structured missing-marker data or the reusable Markdown marker report.

## Parameters

**-AsMarkdown SwitchParameter optional**

Return OfficeIMO's Markdown marker report.

**-Binding IDictionary required**

Template bindings keyed by marker name.

**-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path**

Workbook path.

**-Quiet SwitchParameter optional**

Return only a Boolean pass/fail value.

**-ThrowOnMissing SwitchParameter optional**

Throw when any marker is missing.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document**

Workbook document.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:CA1AE0849AB75C91DE24371D62D9626455A097242ADA1B08BF430D15D36C2AC6 -->
