Next Previous Up Contents
Next: Tab-Separated Table
Up: Supplied Input Handlers
Previous: ASCII

3.5.8 Comma-Separated Values

The CsvTableBuilder handler can read data in the semi-standard CSV format. The intention is that it understands the version of that format spoken by MS Excel amongst others, though the documentation on which it is based was not obtained directly from Microsoft.

The rules for data which it understands are as follows:

Note that you can not use a "#" character (or anything else) to introduce "comment" lines.

Because the CSV format contains no metadata beyond column names, STIL is forced to guess the datatype of the values in each column. It does this by reading the whole file through once and guessing on the basis of what it has seen. This has the disadvantages:

This means that CSV is not generally recommended if you can use another format instead. If you're stuck with a large CSV file that's misbehaving or slow to use, one possibility is to turn it into an ECSV file by adding some header lines by hand.


Next Previous Up Contents
Next: Tab-Separated Table
Up: Supplied Input Handlers
Previous: ASCII

STIL - Starlink Tables Infrastructure Library
Starlink User Note252
STIL web page: http://www.starlink.ac.uk/stil/
Author email: m.b.taylor@bristol.ac.uk