Skip to content

Read Excel Range

Type: excel-read-range  ·  Package: Excel Activities v1.0.0  ·  Output: DataTable

Reads a range of cells and returns it as a DataTable (tabular data is always a DataTable). Useful when you want to read a specific portion of the sheet: unlike Read Excel Sheet —which reads the whole used range— here you give the exact range.

By default the first row is treated as headers. If your range has none, set hasHeader = no and columns are auto-named (Column1, Column2…).

Reads the cells from the given range and builds a DataTable. If hasHeader is true (the default), the first row provides the column names; if false, columns are auto-named. Accepts session or path — see the two modes.

ParameterEditorDescription
rangeexpressionRange address, e.g. "A1:D20".
ParameterEditorDescription
sessionexpressionExcel Open session (instead of path).
pathexpressionPath to the .xlsx (required if there is no session).
sheetexpressionName or 1-based index of the sheet. By default, the first.
hasHeaderyes/noTreat the first row as headers (default: yes).

Returns a DataTable. Iterate it with For Each and access by column name (row["Total"]), or process it with the DataTable package activities.

Read Excel Range path = = asset("data.xlsx") range = "A1:C50" → output: table
Log message = = "Rows read: " + str(rowCount(table))
For Each item = row in = = table
└─ body:
Log message = = row["Customer"] + " — " + str(row["Total"])