Class ExcelParserOptions
Options controlling how ExcelParser<T> locates the header row, matches header text to bound properties, and handles cells that fail to parse.
public sealed class ExcelParserOptions
- Inheritance
-
ExcelParserOptions
- Inherited Members
Properties
ColumnNameComparer
Gets the comparer used to match header text to the names bound by property attributes. Defaults to OrdinalIgnoreCase.
public StringComparer ColumnNameComparer { get; init; }
Property Value
Culture
Gets the culture used when parsing text-backed numeric and Guid cells (e.g. pt-BR "1.234,56"). Binary numeric cells from XLS/XLSB carry a raw double and ignore this setting. Defaults to InvariantCulture.
public CultureInfo Culture { get; init; }
Property Value
HeaderNormalization
Gets how header text is normalized before it is compared against bound property names. Defaults to Trim.
public HeaderNormalization HeaderNormalization { get; init; }
Property Value
HeaderRow
Gets the 1-based row number that contains column headers. Defaults to 1.
public int HeaderRow { get; init; }
Property Value
ThrowOnParseFailure
Gets whether a non-empty cell that fails to parse into its bound property's type throws
ExcelParseException instead of silently leaving the property at its default. Defaults to
false. Independent of [ExcelRequired], which always throws on a failed
parse of a required column regardless of this flag.
public bool ThrowOnParseFailure { get; init; }