Property InferTypes
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
InferTypes
Gets or sets a value indicating whether a field that reads as a number or as an ISO 8601 date becomes one. Default false: every field is text, which loses nothing.
public bool InferTypes { get; set; }
Property Value
Remarks
Only an unquoted field is considered. A number is digits with an optional sign, decimal
point and exponent, in the invariant form (-1234.5, 1E+3), and not one
with a leading zero before another digit (007 stays text). A date is
2026-11-17, optionally followed by T or a space and 08:30 or
08:30:15, from the year 1900; it is stored as Excel stores a date and shown
through yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. Nothing else is guessed: not a
boolean, not a percentage, not a date in a local form. A column that receives a date is
made wide enough to show it (11 characters, 20 with a time): Excel shows a date its
column cannot fit as a row of hashes, and a new sheet's columns fit eight characters.