Skip to content
Frank Stüber edited this page Feb 8, 2024 · 5 revisions

CSV stands for Comma-Separated Values, a simple file format used to store tabular data, with each line representing a row of data, and commas separating the values within each row.

The ENBREA CSV library provides classes for parsing CSV sources and building CSV outputs.

Reading from CSV sources

  • The CsvReader class implements a low-level CSV reader which parses a CSV stream line by line and field by field.

  • The CsvTableReader class is implemented on top of the CsvReader class and interprets the first line of the CSV stream as header line. Field access is by index or by header name. This reader supports type conversion for field values and mapping of POCO classes.

  • The CsvLineParser class implements a low-level CSV parser which parses single CSV strings field by field.

  • The CsvLineTableParser class is implemented on top of the CsvLineParser class. Field access is by index or by header name. This class supports type conversion for field values.

Writing to CSV outputs

  • The CsvWriter class implements a low-level CSV writer which writes to a CSV stream line by line and field by field.

  • The CsvTableWriter class is implemented on top of the CsvWriter class and interprets the first line of the CSV stream as header line. Field assignment is by index or by header name. This writer supports type conversion for field values and mapping of POCO classes.

  • The CsvLineBuilder class implements a low-level CSV writer which builds single CSV strings field by field.

  • The CsvLineTableBuilder class is implemented on top of the CsvLineBuilder class. Field assignment is by index or by header name. This class supports type conversion for field values.

CSV dictionaries

A CSV dictionary is a CSV file with 2 columns. Each record represents a key/value pair. The CsvDictionary class implements a CSV dictionary that can be written to or read from a CSV file. Field access is by key name. This class supports type conversion for field values.

Clone this wiki locally