flow-table is a template rendering application / library for .xlsx file. Pure golang implementation.
./flow-table -template <template xlsx file> -data <folder containing data> -output <output file>
Write in any table cell:
{{H(.3f)|[js] [data.x, data.y] }}
Next, flow-table will use the js language to execute the expression [data.x, data.y] and render first element in this cell, and extended horizontally (render the second element in right cell), inheriting the same style, and using .3f as the number format.
more abbr:
{{C|[js] data.x }}
{{[js] data.x }}
- expand direction:
C: only render in this CellH: fill cells HorizontallyV: fill cells VerticallyT: fill cells all direct
- format:
s: as a stringXd: such as10d, integer.Xf: such as.3f, float with 3 digits after the decimal point character.Xp: such as.2p, percentage with 2 digits after the decimal point character
- language:
allow some alias name,
javascriptcan also be use asjs
flow-table will try load all files in the given directory for using as data source (Won't search file recurse). Each loaded data source will use the file name (without the extension) as the variable name.
support format:
- sqlite:
- with ext
.dbor.sqlite - each table will be a property(in javascript) or key-value(in other language)
- each property is an array of struct / dict
- with ext
- xlsx:
- with ext
.xlsx - each table will be a property
- each property is a 2d-array
- with ext
- csv:
- value is a 2d-array
If you want more language support, please create an Issue or PR.