Read Excel Sheet
Read Excel Sheet
Section titled “Read Excel Sheet”Type: excel-read-sheet · Package: Excel Activities v1.0.0 · Output: DataTable
Reads a full Excel sheet and returns it as a DataTable, using the first row as column headers. It’s the most practical and common way to read Excel data: you get a table ready to traverse, filter, or dump to another source.
How it works
Section titled “How it works”Opens the indicated sheet and converts it into a DataTable. By default it takes the first row as column names (hasHeader = true), so you then access the cells by name: str(row["Cliente"]). You can limit the reading to a range. Accepts session (session mode) or path (quick mode) — 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 | expression | Excel Open session (instead of path). |
path | expression | Route to .xlsx (fast mode: opens and closes alone). |
sheet | expression | Name or 1-based index of the sheet. By default, the first. |
hasHeader | boolean | The first row is the headers. By default true. |
range | text | Limit to a range, e.g. "A1:D50". |
Output
Section titled “Output”Returns a DataTable. Loop through it with For Each and access cells with str(row["Columna"]).
Example
Section titled “Example”Read Excel Sheet path = = asset("clientes.xlsx") sheet = "Activos" → output: clientesLog message = = "Clientes leídos: " + rowCount(clientes)
For Each items = = clientes itemVariable = fila └─ activities: Log message = = str(row["Nombre"]) + " — " + str(row["NIT"])Related activities
Section titled “Related activities”- Read Excel Range — read raw values without headers.
- Read Excel Cell — read a single cell.
- Write Excel Sheet — write a DataTable back.