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 cells (CSV fields, XLSX/XLSB/XLS strings) as numbers or Guid (e.g. pt-BR "1.234,56"). Numeric and date cells stored by the workbook are always read invariantly 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
SkipEmptyRows
Gets whether a data row in which no bound column holds a value is skipped instead of yielded, as a
hand-edited sheet with formatted-only rows needs. Values in unbound columns do not keep a row. A skipped
row still counts toward the row numbers in ExcelParseException. Defaults to false.
public bool SkipEmptyRows { 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; }