Skip to main content

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​

InputTypeRequiredDefaultWhat it is
SessionStringNowordSession name.
IndexNumberNo1-based position of the one table to read; all tables when empty.
First row is the headerBooleanNotrueThe first row read holds the column names; false names the columns Column1, Column2 and keeps the first row as data.
TitleStringNoRead 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 rowNumberNo1-based first row of the table to read, counting the header row; the first when empty.
To rowNumberNo1-based last row to read, included; the last when empty.
From columnNumberNo1-based first column to read; the first when empty.
To columnNumberNo1-based last column to read, included; the last when empty.

Outputs​

OutputTypeWhat it is
tablesListList of tables.
countNumberNumber of tables in the document.
tableTableThe table chosen by index or title; the first table when both are empty, or empty when there is none.