CsvEngine Class |
Namespace: FileHelpers
The CsvEngine type exposes the following members.
Name | Description | |
---|---|---|
CsvEngine(CsvOptions) |
Create a CsvEngine using the specified sample file with
their headers.
| |
CsvEngine(String, Char, Int32) | Create a CsvEngine using the specified number of fields. With this constructor will ignore the first line of the file. Use CsvOptions overload. | |
CsvEngine(String, Char, String) | Create a CsvEngine using the specified sample file with their headers. With this constructor will ignore the first line of the file. Use CsvOptions overload. |
Name | Description | |
---|---|---|
Encoding |
The encoding to Read and Write the streams.
Default is the system's current ANSI code page.
(Inherited from EngineBase.) | |
ErrorManager | This is a common class that manages the errors of the library. (Inherited from EngineBase.) | |
ErrorMode |
Indicates the behavior of the engine when it finds an error.
{Shortcut for )
(Inherited from EngineBase.) | |
FooterText | The Read Footer in the last Read operation. If any. (Inherited from EngineBase.) | |
HeaderText | The Read Header in the last Read operation. If any. (Inherited from EngineBase.) | |
LineNumber | The current line number. (Inherited from EngineBase.) | |
NewLineForWrite |
Newline string to be used when engine writes to file.
Default is the system's newline setting (System.Environment.NewLine).
(Inherited from EngineBase.) | |
Options |
Allows you to change some record layout options at runtime
(Inherited from EngineBase.) | |
RecordType | Returns the type of records handled by this engine. (Inherited from EngineBase.) | |
TotalRecords | The total numbers of records in the last read/written file
(only works with whole read/write). (Inherited from EngineBase.) |
Name | Description | |
---|---|---|
AppendToFile(String, IEnumerableT) |
Append an array of records to the specified file.
(Inherited from FileHelperEngineT.) | |
AppendToFile(String, T) |
Append a record to the specified file.
(Inherited from FileHelperEngineT.) | |
CsvToDataTable(String, CsvOptions) |
Reads a CSV File and return their contents as
DataTable
| |
CsvToDataTable(String, Char) | Reads a CSV File and return their contents as DataTable (The file must have the field names in the first row) | |
CsvToDataTable(String, String, Char) |
Reads a CSV File and return their contents as DataTable
(The file must have the field names in the first
row)
| |
CsvToDataTable(String, String, Char, Boolean) |
Reads a CSV File and return their contents as DataTable
| |
CsvToDataTable(String, String, Char, Boolean, Boolean) |
Reads a CSV File and return their contents as DataTable
| |
DataTableToCsv(DataTable, String) |
Simply dumps the DataTable contents to a delimited file
using a ',' as delimiter.
| |
DataTableToCsv(DataTable, String, CsvOptions) |
Simply dumps the DataTable contents to a delimited file. Only
allows to set the delimiter.
| |
DataTableToCsv(DataTable, String, Char) |
Simply dumps the DataTable contents to a delimited file using
delimiter as delimiter.
| |
GetFileHeader |
Builds a line with the name of the fields, for a delimited files it
uses the same delimiter, for a fixed length field it writes the
fields names separated with tabs
(Inherited from EngineBase.) | |
ReadFile(String) |
Read a file and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadFile(String, Int32) |
Read a file and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadFileAsDT(String) | Obsolete.
Read the records of the file and fill a DataTable with them
(Inherited from FileHelperEngineT.) | |
ReadFileAsDT(String, Int32) | Obsolete.
Read the records of the file and fill a DataTable with them
(Inherited from FileHelperEngineT.) | |
ReadFileAsList(String) | Obsolete.
Read a file and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadFileAsList(String, Int32) | Obsolete.
Read a file and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadStream(TextReader) |
Read a Stream and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadStream(TextReader, Int32) |
Read a Stream and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadStreamAsDT(TextReader) | Obsolete.
Read the records of the stream and fill a DataTable with them
(Inherited from FileHelperEngineT.) | |
ReadStreamAsDT(TextReader, Int32) | Obsolete.
Read the records of the stream and fill a DataTable with them
(Inherited from FileHelperEngineT.) | |
ReadStreamAsList | Obsolete.
Read a Stream and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadString(String) |
Read a String and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadString(String, Int32) |
Read a String and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadStringAsDT(String) | Obsolete.
Read the records of a string and fill a DataTable with them.
(Inherited from FileHelperEngineT.) | |
ReadStringAsDT(String, Int32) | Obsolete.
Read the records of a string and fill a DataTable with them.
(Inherited from FileHelperEngineT.) | |
ReadStringAsList(String) | Obsolete.
Read a String and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
ReadStringAsList(String, Int32) | Obsolete.
Read a String and return an array of the contained records.
(Inherited from FileHelperEngineT.) | |
WriteFile(String, IEnumerableT) |
Write an array of records to the specified file.
(Inherited from FileHelperEngineT.) | |
WriteFile(String, IEnumerableT, Int32) |
Write the specified number of records from the array to a file.
(Inherited from FileHelperEngineT.) | |
WriteStream(TextWriter, IEnumerableT) |
Write an array of records to the specified Stream.
(Inherited from FileHelperEngineT.) | |
WriteStream(TextWriter, IEnumerableT, Int32) |
Write the specified number of records in the array to the Stream.
(Inherited from FileHelperEngineT.) | |
WriteString(IEnumerableT) |
Write an array of records to an String and return it.
(Inherited from FileHelperEngineT.) | |
WriteString(IEnumerableT, Int32) |
Write an array of records to an String and return it.
(Inherited from FileHelperEngineT.) |
Name | Description | |
---|---|---|
AfterReadRecord |
Called in read operations just after the record was created from a
record string.
(Inherited from EventEngineBaseT.) | |
AfterWriteRecord |
Called in write operations just after the record was converted to a
string.
(Inherited from EventEngineBaseT.) | |
BeforeReadRecord |
Called in read operations just before the record string is
translated to a record.
(Inherited from EventEngineBaseT.) | |
BeforeWriteRecord |
Called in write operations just before the record is converted to a
string to write it.
(Inherited from EventEngineBaseT.) | |
Progress | Event handler called to notify progress. (Inherited from EngineBase.) |