Table of Contents

Class XlsxPlaceholderOptions

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

How placeholders are recognized in a workbook and how their values are written.

public sealed class XlsxPlaceholderOptions
Inheritance
XlsxPlaceholderOptions
Inherited Members

Remarks

The options a document's placeholders take, with the same defaults, and two a grid adds: TypedValues and DateFormat.

Constructors

XlsxPlaceholderOptions()

Creates options with the defaults.

Properties

Culture

Gets or sets the culture used to format values written into text, or null for InvariantCulture. Never the ambient culture: that would make the output depend on the machine.

DateFormat

Gets or sets the number format given to a cell that takes a DateTime and whose own format does not show dates. Default yyyy-mm-dd. Null or empty leaves the cell's format alone, and the date then shows as its serial number.

MatchCase

Gets or sets whether a name is matched to a key case-sensitively. Default false, because a template author and a data source rarely agree on casing. Matching is ordinal either way.

Prefix

Gets or sets the text that opens a placeholder. Default "{{".

Suffix

Gets or sets the text that closes a placeholder. Default "}}".

TrimNames

Gets or sets whether surrounding whitespace is trimmed off a placeholder's name, so {{ Name }} and {{Name}} name the same value. Default true.

TypedValues

Gets or sets whether a placeholder that is the whole of a cell takes the type of its value: a number becomes a numeric cell, a boolean a boolean cell, a DateTime a date, an XlsxCellValue itself, and null an empty cell that keeps its format. Default true. When false, or when the placeholder is only part of the cell's text, the value is formatted into the text.

Unresolved

Gets or sets what happens to a placeholder the data has no key for. Default Leave.