DataTable Activities
Version: 1.0.0 · ID: zoan-packages-datatable · Author: Zoan Software
The DataTable package transforms data tables in memory: filter them, sort them, add calculated columns, sum, group and join. It is the natural complement to the packages that produce tables — Excel, CSV, Database and Google Sheets — and to the browser’s Extract Table. You read data from a source, process it with these activities, and write the result wherever you want.
Key concept: return a new table
Section titled “Key concept: return a new table”Almost all of these activities do not modify the original table: they return a new table with the result. That’s why you always capture its output in a variable (which can be the same or another).
Filter DataTable table = = ventas ... → output: ventasFiltradasSort DataTable table = = ventasFiltradas column = "Total" → output: ventasOrdenadasYou can chain operations by passing the output of one as the input to the next, building a “pipeline” of transformations.
DataTable vs. expresiones (LINQ)
Section titled “DataTable vs. expresiones (LINQ)”You have two ways to manipulate tables, and they complement each other:
- These activities: visual, self-explanatory, ideal for common operations (filtering, sorting, grouping). Recommended for most cases.
- Expressions with LINQ (
asRows,Where,Select,OrderBy…): more flexible for custom logic. See Expressions › LINQ.
Activities
Section titled “Activities”Create and read
Section titled “Create and read”| Activity | Type | Output | What it does |
|---|---|---|---|
| Build DataTable | build-datatable | DataTable | Create a table from columns and rows |
| Get Cell | get-cell | object | Read a cell from a row |
Rows and cells
Section titled “Rows and cells”Operate on individual rows. The writing ones modify the table in place; the reading ones return the row, column or value.
| Activity | Type | Output | What it does |
|---|---|---|---|
| Add Data Row | add-row | DataRow | Append a row (by column or by position) |
| Get Data Row | get-row | DataRow | Get a row by index |
| Find Data Row | find-row | DataRow | First row matching conditions |
| Set Cell | set-cell | — | Set a cell value |
| Update Data Row | update-row | — | Update several columns of a row |
| Remove Data Row | remove-row | — | Remove a row by index |
| Get Column | get-column | List<object> | All values of a column |
| Clear DataTable | clear-datatable | — | Empty all rows (keeps columns) |
Filtrar y ordenar
Section titled “Filtrar y ordenar”| Activity | Type | Output | What it does |
|---|---|---|---|
| Filter DataTable | filter-datatable | DataTable | Filter rows by conditions |
| Sort DataTable | sort-datatable | DataTable | Sort by a column |
Columns
Section titled “Columns”| Activity | Type | Output | What it does |
|---|---|---|---|
| Add Column | add-column | DataTable | Add a calculated column |
| Drop Column | drop-column | DataTable | Remove columns |
| Rename Column | rename-column | DataTable | Rename a column |
Resumir y combinar
Section titled “Resumir y combinar”| Activity | Type | Output | What it does |
|---|---|---|---|
| Aggregate Column | aggregate-column | double | Sum/average/min/max/count of a column |
| Group By | group-by | DataTable | Group by a column and summarize |
| Join DataTable | join-datatable | DataTable | Join two tables by a common column |
A typical flow
Section titled “A typical flow”Read an Excel, keep the pending items, sort them and obtain the total:
Read Excel Sheet path = = asset("facturas.xlsx") → output: facturas
Filter DataTable table = = facturas conditions: Estado equals "Pendiente" → output: pendientesSort DataTable table = = pendientes column = "Vencimiento" direction = asc → output: ordenadasAggregate Column table = = pendientes column = "Total" operation = sum → output: totalPendiente
Log message = = "Hay " + rowCount(ordenadas) + " facturas pendientes por $" + totalPendienteNext steps
Section titled “Next steps”- Data Types › DataTable — basics.
- Filter DataTable — the most common operation.
- Expressions › LINQ — advanced manipulation.