Read tables
Read every table in the document, one table by position or one table by its title, optionally only some of its rows and columns; the first row read can become the column names.
Command in the Word toolkit · id ooa.word/read_tables · 8 inputs, 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Session | String | No | word | Session name. |
| Index | Number | No | 1-based position of the one table to read; all tables when empty. | |
| First row is the header | Boolean | No | true | The first row read holds the column names; false names the columns Column1, Column2 and keeps the first row as data. |
| Title | String | No | Read the one table with this title: the table's alternative-text title, or a Caption-style paragraph just above or below it that contains this text (case is ignored). Used instead of index. | |
| From row | Number | No | 1-based first row of the table to read, counting the header row; the first when empty. | |
| To row | Number | No | 1-based last row to read, included; the last when empty. | |
| From column | Number | No | 1-based first column to read; the first when empty. | |
| To column | Number | No | 1-based last column to read, included; the last when empty. |
Outputs
| Output | Type | What it is |
|---|---|---|
| tables | List | List of tables. |
| count | Number | Number of tables in the document. |
| table | Table | The table chosen by index or title; the first table when both are empty, or empty when there is none. |