# ExcelTemplateOptions

Options used when applying workbook or worksheet template markers.

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ExcelTemplate.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L41)

**Modifiers**

sealed

Options used when applying workbook or worksheet template markers.

## Inheritance

- object
- ExcelTemplateOptions

## Usage

Explore 8 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [ExcelTemplateOptions.AddFormatter](/api/excel/officeimo-excel-exceltemplateoptions/#method-addformatter-string-officeimo-excel-exceltemplatevalueformatter)

### Accepted by parameters 7

- Method [ExcelDocument.ApplyTemplate](/api/excel/officeimo-excel-exceldocument/#method-applytemplate-collections-generic-idictionary-system-string-system-object-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelDocument.ApplyTemplateSheets](/api/excel/officeimo-excel-exceldocument/#method-applytemplatesheets-string-collections-generic-ienumerable-system-collections-generic-idictionary-system-string-system-object-func-system-collections-generic-idictionary-system-string-system-object-system-int32-system-string-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelDocument.ApplyTemplateSheets``1](/api/excel/officeimo-excel-exceldocument/#method-applytemplatesheets-string-collections-generic-ienumerable-func-system-int32-system-string-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelSheet.ApplyTemplate](/api/excel/officeimo-excel-excelsheet/#method-applytemplate-collections-generic-idictionary-system-string-system-object-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelSheet.ApplyTemplateOptionalRows](/api/excel/officeimo-excel-excelsheet/#method-applytemplateoptionalrows-int32-int32-boolean-collections-generic-idictionary-system-string-system-object-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelSheet.ApplyTemplateRows](/api/excel/officeimo-excel-excelsheet/#method-applytemplaterows-int32-collections-generic-ienumerable-system-collections-generic-idictionary-system-string-system-object-officeimo-excel-exceltemplateoptions) parameter `options`
- Method [ExcelSheet.ApplyTemplateRows``1](/api/excel/officeimo-excel-excelsheet/#method-applytemplaterows-int32-collections-generic-ienumerable-officeimo-excel-exceltemplateoptions) parameter `options`

Filter members 

Show inherited

## Constructors

`public ExcelTemplateOptions()` [#](#constructor-ctor)

[ExcelTemplate.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L41)

## Methods

`public ExcelTemplateOptions AddFormatter(string name, ExcelTemplateValueFormatter formatter)` [#](#method-addformatter-string-officeimo-excel-exceltemplatevalueformatter)

[ExcelTemplate.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L47)

Adds or replaces a named custom formatter and returns this options instance.

Parameters

**name string required**

**formatter OfficeIMO.Excel.ExcelTemplateValueFormatter required**

Returns

`ExcelTemplateOptions`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IFormatProvider? FormatProvider { get; set; }` [#](#property-formatprovider)

[ExcelTemplate.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L31)

Format provider used by built-in aliases and custom formatters.

`public bool ThrowOnMissing { get; set; }` [#](#property-throwonmissing)

[ExcelTemplate.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L34)

Throws when a marker is not supplied by the values/model. Equivalent to [ExcelTemplateMissingValueBehavior.Throw](/api/excel/officeimo-excel-exceltemplatemissingvaluebehavior/).

`public ExcelTemplateMissingValueBehavior MissingValueBehavior { get; set; }` [#](#property-missingvaluebehavior)

[ExcelTemplate.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L37)

Behavior used when a marker is not supplied by the values/model.

`public IDictionary<string, ExcelTemplateValueFormatter> Formatters { get; }` [#](#property-formatters)

[ExcelTemplate.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelTemplate.cs#L40)

Named custom formatters, keyed by marker format such as "upper" in {{Name:upper}}.

<!-- PowerForge markdown artifact sha256:71E55A91CB1C53C6961FCE963FD9F34DBFD9C7C6EFD69C4771264578672E0474 -->
