xTxT Documentation

Tables (/tablefile /tablecsv)

Table rendering is supported from Csv data sources given certain criteria; The At present, support for tables exists both in-line, and in reference to external files.


Table from Csv

/tablecsv
Col1,Col2,Col3
Row1a,Row1b

renders as;

Col1Col2Col3
Row1aRow1b

Notes;

  • The Csv table terminates at the first blank line, or at the end of the xTxT file, whichever comes first.
  • If a row is short, meaning it has fewer values in it, the rightmost columns will be blank
  • The first row is always a header
  • Make sure to use valid Csv.
    • If a field contains a comma, make certain to wrap the field in double quotes.
      • e.g. Row1a,"Row,1b"
    • If a field contains a double-quote, make certain it is doubled, and that the field is also wrapped in double quotes
      • e.g. Row1a,"Row""1b"

Styling

The appearance of the table can be controlled using Css classes, which are applied at the row (TR) level. These classes are available for manipulation using the xTxT /css tag, or the /style tag.

  • Header
  • Item