Options of file format

When table created, loaded from file or saved into file there can be set column separator and column enclosing characters.

Option
By default
Description
$.separator[character]
tab
Specifies column separator character
$.encloser[character]
none
Specifies column encloser character


Note: if column encloser or column separator options woere set to #, the removing lines started from this character will be disabled.   [3.4.1]


Example of loading .txt file created by Miscrosoft Excel
Excel can store data into simple tab-delimited text file:
   File|Save as… Text (Tab delimited) (
.txt).
The data is stored in this format:
name
description
"New company ""Smith&Co"""
Text

(Values of several columns is quoted and quotation marks in value itself doubled)

To read such a file, one can specify this option:
$companies[^table::load[companies.txt;
   $.encloser["]
]]
$companies.name

Parser can also work with
.csv files, just set this option:
   $.separator[^;]


Copyright © 1997–2017 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 26.04.2017