CSV (Comma Separated Value) Format

CSV stands for comma separated values and is a common file format for simple spreadsheet and database transfer between applications.

A CSV file consists of numbers and textual labels, with fields separated by commas and lines by a line separator. The following line demonstrates most of the characteristics of CSV format:

"textstring1", 123.456, "text""string2", 7.8E9, "text,string3" {LS}
1 2 3 4 5 6
  1. Text strings appear in double quotes.
  2. Numbers do not appear in quotes.
  3. Double quotes characters can be included in text strings and are represented as two double quotes characters. The example above should be interpreted as text"string2.
  4. Scientific notation is understood with both upper-case E and lower-case e being acceptable.
  5. Commas may appear in text strings.
  6. A line separator (LF, CR, CR-LF or LF-CR) may be saved with the file.
  7. White space (spaces or TAB characters) on either side of comma separators is ignored. Spaces within numbers are erroneous.