CleanCode.CsvProcessing DataGridFileLoader
Namespace: CleanCode.CsvProcessing
Assembly: CleanCode.CsvProcessing (in CleanCode.CsvProcessing.dll) Version: 1.2.3.0 (1.2.03)
This class was designed with log files in mind, hence the capability to handle multiple files of a similar structure, going back a selectable number of days.
The DataGridView must be setup in advance with the appropriate number of columns. Typically the DataGridView should have no rows; each record in the file will be stored in a new row in the DataGridView. The files to read must be CSV files (i.e. fields separated by commas).
The single file case is straightforward--all elements of all rows are loaded into the DataGridView, so the DataGridView must have at least as many columns as the widest row in the file. (Generally, each row should have the same number of fields, though.)
Multiple files may be melded seamlessly, but should generally have the same record structure (i.e. number, order, and meaning of fields). All the files to be merged must be in the same directory; you select a subset of files in a given directory with a standard file matching pattern (e.g. "*.log"). You may further filter the file list by specifying how many days prior to today to include, based on file modification times.
Since CleanCode 0.9.07.