CommonEngineCsvToDataTable Method (String, String, Char, Boolean) |
Reads a Csv File and return their contents as DataTable
Namespace:
FileHelpers
Assembly:
FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntaxpublic static DataTable CsvToDataTable(
string filename,
string classname,
char delimiter,
bool hasHeader
)
Public Shared Function CsvToDataTable (
filename As String,
classname As String,
delimiter As Char,
hasHeader As Boolean
) As DataTable
Parameters
- filename
- Type: SystemString
The file to read. - classname
- Type: SystemString
The name of the record class - delimiter
- Type: SystemChar
The delimiter for each field - hasHeader
- Type: SystemBoolean
Indicates if the file contains a header with the field names.
Return Value
Type:
DataTableThe contents of the file as a DataTable
See Also