TableInterpreter
Input type: Sheet
Output type: Table
Description
Interprets a Sheet as a Table. In case a header row is present in the
sheet, its names can be matched with the provided column names. Otherwise, the
provided column names are assigned in order.
Example 1
interprets it as a `Table` by assigning a value type property to each column.
The column names are matched to the header, so the order of the type
assignments does not matter.
valuetype Car {
property name oftype text;
property mpg oftype decimal;
property cyl oftype integer;
}
block CarsTableInterpreter oftype TableInterpreter {
header: true;
columns: Car;
}
Interprets a Sheet about cars with a topmost header row and
Example 2
interprets it as a `Table` by sequentially assigning a name and a value type
property to each column of the sheet. Note that the order of columns matters
here. The first column (column `A`) will be named "name", the second column
(column `B`) will be named "mpg" etc.
block CarsTableInterpreter oftype TableInterpreter {
header: false;
columns: Car;
}
Interprets a Sheet about cars without a topmost header row and
Properties
header
Type boolean
Default: true
Description
Whether the first row should be interpreted as header row.
columns
Type ValuetypeDefinition
Description
Reference to a valuetype that defines the table schema. Each of the valuetype's properties symbolizes a column, the property's name is the column's name and the property's valuetype is the column's valuetype.
parseWith
Type Transform
Description
This transform to create each table row from the sheet row