CSVSettings Properties
The following tables list the members exposed by the CSVSettings type.
| Name | Description | |
|---|---|---|
|
AllowNull | /// Set this value to true to allow nulls to be rendered in CSV files when serializing /// and deserializing. /// /// CSV files by default do not have a mechanism for differentiating between null fields /// and empty fields. If this field is set to false, both `null` and empty string will /// render as an empty string. /// /// If this field is set to true, all non-null fields will be enclosed by the text qualifier, /// and fields that are null will be represented as `NullToken`. /// |
|
AllowSepLine | /// When reading a CSV file, if the first line contains the instruction `sep=`, use this /// to determine the separator for the file. /// /// The "sep" line is a feature exclusive to Microsoft Excel, which permits CSV files to /// more easily handle European files where the comma character is often a separator between /// numeric values rather than a field delimiter. /// /// If this flag is set to true, when you parse a CSV, the first line of the parsing can override /// the field separator logic for each individual instance of parsing, but it will not change /// the `FieldDelimiter` in your settings object. /// /// More information: /// * [Original Issue Report](https://github.com/tspence/csharp-csv-reader/issues/28) /// * [Superuser Article](https://superuser.com/questions/773644/what-is-the-sep-metadata-you-can-add-to-csvs) /// * [Tjitjing Blog](https://blog.tjitjing.com/index.php/2016/07/set-separator-delimiter-in-csv-file-to-open-correctly-in-excel.html) /// |
|
AssumedHeaders | /// If `HeaderRowIncluded` is false, use these values for the headers /// |
|
BufferSize | /// When reading data from a stream, this is the block size to read at once. /// |
|
DateTimeFormat | /// The format to use for serializing date time objects, by default, ISO 8601 /// |
|
Encoding | /// The encoding for converting streams of bytes to strings /// |
|
ExcludedColumns | /// Exclude these columns during serialization and deserialization /// |
|
FieldDelimiter | /// The character used to delimit individual fields in the CSV. /// |
|
ForceQualifierTypes | /// A list of data types that require text qualifiers during serialization. /// |
|
ForceQualifiers | /// Set this value to true to enclose all fields in the text qualifier character. /// |
|
HeaderRowIncluded | /// The first line of the CSV file will include the names of each field. /// |
|
HeadersCaseSensitive | /// Expect headers to be case sensitive during deserialization /// |
|
IgnoreDimensionErrors | /// Set this value to true to allow parsing for files where each row has a different number of fields /// |
|
IgnoreEmptyLineForDeserialization | /// Some CSV files contain an empty line at the end. If you set this flag to true, deserialization will /// not throw an error for empty lines and will instead ignore it. /// |
|
IgnoreHeaderErrors | /// Set this value to true to ignore header errors when deserializing /// |
|
IgnoreReadOnlyProperties | /// Set this flag to true to ignore read-only properties during serialization /// |
|
LineSeparator | /// The separator used to indicate the end of a line in the CSV file. /// |
|
NestedArrayBehavior | /// The behavior to use when serializing a column that is an array or enumerable type /// |
|
NestedObjectBehavior | /// The behavior to use when serializing a column that is a class /// |
|
NullToken | /// If AllowNull is set to true, this token will be used to represent NULL values. /// |
|
TextQualifier | /// The character used to enclose fields that contain the delimiter character. /// |