CSV

From Market Ruler Help
Jump to: navigation, search

Comma Separated Values. A file format for exporting spreadsheet or database-style data into a text file format.

CSV files are easily imported and exported from popular spreadsheet programs such as:

Similarly, they can also be easily imported and exported from many popular database programs.

Due to the simplicity of the format, it is widely supported. The basic syntax is:

column,column,column,column<CRLF>

Where

column

consists of a token which can be any character except for comma (,) double-quote ("), space (" "), or newline (hex character 0x13). If it contains a comma, double-quote, space, or linefeed, then it is surrounded by double-quotes. Any internal double-quotes are then quoted with another quote character.

So the following tokens are converted to CSV as follows:

The quick
"Not me, he said."
It"s almost correct

To:

"The quick"
"""Not me, he said"""
"It""s almost correct"

So, if these were in one row in a CSV file:

"The quick","""Not me, he said""","It""s almost correct"

Each line is terminated by a carriage return (hex character 0x10) and a linefeed (hex character 0x13). Some CSV parsers will accept just a linefeed character.