# tablebyrows

    .tablebyrows headers:{List<Any> = emptyList()} rows:{List<Iterable<out Any>>} -> Node

Content copied to clipboard

Generates a table from a list of rows, where each row is a list of cell values. Optionally, headers can be provided for the columns.

Example:

    .var {headers}
       - Name
       - Age
       - City

    .tablebyrows {.headers}
      - - John
        - 25
        - NY
      - - Lisa
        - 32
        - LA
      - - Mike
        - 19
        - CHI

Content copied to clipboard

Result:

    | Name | Age | City |
    |------|-----|------|
    | John | 25  | NY   |
    | Lisa | 32  | LA   |
    | Mike | 19  | CHI  |

Content copied to clipboard

#### Return

the generated Table node

#### Parameters

context

the current context, injected automatically

headers

- Optional

optional list of headers for the columns. If not provided, no headers are used.

rows

list of rows, where each row is an iterable of cell values. Rows can have varying lengths; missing cells will be filled with empty content.

#### Wiki page

table-generation