:- use_module(library(csv)).(can be autoloaded)
- The comma-separator. Must be a character code. Default is (of course)
the comma. Character codes can be specified using the 0' notion. E.g.,
separator(0';)parses a semicolon separated file.
true(default false), threat double quotes as a normal character.
false), strip leading and trailing blank space. RFC4180 says that blank space is part of the data.
- Skip leading lines that start with CommentLead. There is no
standard for comments in CSV files, but some CSV files have a header
where each line starts with
#. After skipping comment lines this option causes csv//2 to skip empty lines. Note that an empty line may not contain white space characters (space or tab) as these may provide valid data.
true(default), use name/2 on the field data. This translates the field into a number if possible.
down, downcase atomic values. If
up, upcase them and if
preserve(default), do not change the case.
- Functor to use for creating row terms. Default is
- Number of fields in each row. This predicate raises a
domain_error(row_arity(Expected), Found)if a row is found with different arity.
true), do not reject CSV files where lines provide a varying number of fields (columns). This can be a work-around to use some incorrect CSV files.