The following tables list the members exposed by CsvReader.
Public Constructors
Public Properties
| Name | Description |
| ConvertBlankToNull |
If true, blanks (string.empty) will be converted to null. The default is false.
|
| DefaultEncoding |
Override the default encoding. The default is Encoding.Default
|
| EscapeCharacter |
Value used to escape the quote character. Defaults to \
|
| HasHeader |
If true, the source has a header. Defaults to true
|
| QuoteCharacter |
The quote character. Defaults to double quote
|
| RemoveColumnNameSpaces |
Any spaces in header column names are removed. The default is true.
|
| Seperator |
The seperator for the columns. Default is a comma. It can be changed to a pipe, tab, etc.
|
| TrimSpaces |
Any spaces will be trimmed. The default is true.
|
Top
Public Methods
| Name | Description |
| CsvFileToDataReader |
Create a forward only reader for a CSV file
|
| CsvFileToDataTable |
Read a CSV file into a DataTable.
There must be a header row and the column names must be alpha numeric.
|
| CsvFileToDictionary |
Read a CSV File and return a dictionary with the keys as the header names.
By default header column name spaces are removed. See RemoveColumnNameSpaces.
|
| CsvFileToObjectList<T> |
Read a CSV file into a list of objects.
Public properties are mapped by name, they are case sensitive.
It will automatically map all primitive types such as int, long, string and complex types of GUID, Enum, DateTime.
Properties that do not exist are ignored.
|
| CsvFileToStringList |
Read a CSV File and return a list of rows and columns
|
| CsvStreamToDataReader |
Create a forward only reader for a CSV stream
|
| CsvStreamToDataTable |
Read a CSV stream into a DataTable
|
| CsvStreamToDictionary |
Read a CSV Stream and return a dictionary with the keys as the header names.
By default header column name spaces are removed. See RemoveColumnNameSpaces.
|
| CsvStreamToObjectList<T> |
Read a CSV stream into a list of objects.
Public properties are mapped by name, they are case sensitive.
By default header column name spaces are removed. See RemoveColumnNameSpaces.
It will automatically map all primitive types such as int, long, string and complex types of GUID, Enum, DateTime
Properties that do not exist are ignored.
|
| CsvStreamToStringList |
Read a CSV Stream and return a list of rows and columns
|
| CsvStringToDataTable |
Read a CSV string into a DataTable.
There must be a header row and the column names must be alpha numeric.
|
| CsvStringToDictionary |
Read a CSV String and return a dictionary with the keys as the header names.
By default header column name spaces are removed. See RemoveColumnNameSpaces.
|
| CsvStringToObjectList<T> |
Read a CSV string into a list of objects.
Public properties are mapped by name, they are case sensitive.
It will automatically map all primitive types such as int, long, string and complex types of GUID, Enum, DateTime.
Properties that do not exist are ignored.
|
| CsvStringToStringList |
Read a CSV String and return a list of rows and columns
|
| PreProcessFile |
This will replace CR with CRLF if the line does not already end with CRLF
|
Top
See Also