Skip to content

Word Read Tables

Type: word-read-tables  ·  Package: Word Activities v1.0.0  ·  Output: List<DataTable>

Reads all tables in a Word document and returns them as a list of DataTables (one for each table in the document). Useful for extracting tabular data from documents: a price table, a list, an annex.

Detects the tables in the document and converts each one into a DataTable. By default it treats the first row of each table as headers (hasHeader). Accepts session or path — see the two modes.

Ninguno — pero debes indicar session o path.

ParameterEditorDescription
sessionsessionWord Open session (instead of path).
pathexpressionRoute to .docx (fast mode).
hasHeaderbooleanThe first row of each table is the headers. By default true.

Returns a List of DataTable (one per table in the document).

Process the first table of the document:

Word Read Tables path = = asset("anexo.docx") → output: tablas
If condition = = count(tablas) > 0
└─ then:
Set Variable name = primera value = = first(tablas)
Log message = = "Filas: " + rowCount(primera)