Word Read Tables
Word Read Tables
Section titled “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.
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”Ninguno — pero debes indicar session o path.
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | Word Open session (instead of path). |
path | expression | Route to .docx (fast mode). |
hasHeader | boolean | The first row of each table is the headers. By default true. |
Output
Section titled “Output”Returns a List of DataTable (one per table in the document).
Example
Section titled “Example”Process the first table of the document:
Word Read Tables path = = asset("anexo.docx") → output: tablasIf condition = = count(tablas) > 0 └─ then: Set Variable name = primera value = = first(tablas) Log message = = "Filas: " + rowCount(primera)Related activities
Section titled “Related activities”- Word Append Table — write a table to a document.
- DataTable — process the extracted tables.