CSV (Comma-Separated Values)

CSV (Comma-Separated Values) is a common data exchange format that is widely supported by consumer, business, and scientific applications. Among its most common uses is moving tabular data between programs that natively operate on incompatible (often proprietary and/or undocumented) formats.

For example, a user may need to transfer information from a database program that stores data in a proprietary format to a spreadsheet that uses a completely different format. The database program most likely can export its data as "CSV"; the exported CSV file can then be imported by the spreadsheet program.

Powertech Central Administration functions that operate upon CSV files use the following rules for CSV formatting:

  1. The file will be plain text in any CCSID available on the IBM i.
  2. Lines of text end with at least a carriage return.
  3. The file consists of rows with there being one row per line of text.
  4. Each row is divided into columns with the comma character.
  5. Every row has the same sequence of columns.
  6. The first row of the file will contain column headings.
  7. If the value for a column contains a comma, that value must be surrounded by quotation marks (").
  8. Quotation marks (") contained in the column value must be doubled ("") when the value for the column is surrounded by quotation marks (").

 

Related Topics