Skip to content

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.

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: ventasFiltradas
Sort DataTable table = = ventasFiltradas column = "Total" → output: ventasOrdenadas

You can chain operations by passing the output of one as the input to the next, building a “pipeline” of transformations.

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.
ActivityTypeOutputWhat it does
Build DataTablebuild-datatableDataTableCreate a table from columns and rows
Get Cellget-cellobjectRead a cell from a row

Operate on individual rows. The writing ones modify the table in place; the reading ones return the row, column or value.

ActivityTypeOutputWhat it does
Add Data Rowadd-rowDataRowAppend a row (by column or by position)
Get Data Rowget-rowDataRowGet a row by index
Find Data Rowfind-rowDataRowFirst row matching conditions
Set Cellset-cellSet a cell value
Update Data Rowupdate-rowUpdate several columns of a row
Remove Data Rowremove-rowRemove a row by index
Get Columnget-columnList<object>All values of a column
Clear DataTableclear-datatableEmpty all rows (keeps columns)
ActivityTypeOutputWhat it does
Filter DataTablefilter-datatableDataTableFilter rows by conditions
Sort DataTablesort-datatableDataTableSort by a column
ActivityTypeOutputWhat it does
Add Columnadd-columnDataTableAdd a calculated column
Drop Columndrop-columnDataTableRemove columns
Rename Columnrename-columnDataTableRename a column
ActivityTypeOutputWhat it does
Aggregate Columnaggregate-columndoubleSum/average/min/max/count of a column
Group Bygroup-byDataTableGroup by a column and summarize
Join DataTablejoin-datatableDataTableJoin two tables by a common column

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: pendientes
Sort DataTable table = = pendientes column = "Vencimiento" direction = asc → output: ordenadas
Aggregate Column table = = pendientes column = "Total" operation = sum → output: totalPendiente
Log message = = "Hay " + rowCount(ordenadas) + " facturas pendientes por $" + totalPendiente