Extract Table
Extract Table
Section titled “Extract Table”Type: page-extract-table · Package: Browser v1.0.0 · Output: DataTable
Extracts an entire HTML table from the page and converts it to a DataTable, ready to traverse, filter, or dump to Excel. Automatically recognizes headers as column names. If the table is paginated, it can loop through all the pages for you.
It is much more efficient than reading cell by cell with Get Text: a single activity brings you the entire table.
How it works
Section titled “How it works”Locates <table> (or a container with a table) by its selector and transforms it into a DataTable. If you specify nextPage (the “next” button selector), the activity clicks it and continues pulling until there are no more pages or maxPages is reached, consolidating everything into a single table.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
selector | selector | The <table> element (or a container containing it). |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
page | session | The page session. Omit it inside a body; outside, pass = page. |
nextPage | selector | ”Next page” button. If indicated, extract all pages. |
maxPages | number | Maximum pages to extract. By default 100. |
timeout | number | Maximum time per element in ms. By default 30000. |
Output
Section titled “Output”Returns a DataTable with one row per row of the table and columns named after the headers.
Example
Section titled “Example”Extract a paginated list of movements and scroll through it:
Extract Table selector = (#tablaMovimientos) nextPage = (.btn-siguiente) maxPages = 10 → output: movimientosLog message = = "Filas extraídas: " + rowCount(movimientos)
For Each items = = movimientos itemVariable = fila └─ activities: Log message = = str(row["Fecha"]) + " — " + str(row["Value"])