Skip to content

Get Excel Used Range

Type: excel-get-used-range  ·  Package: Excel Activities v1.0.0  ·  Output: Dictionary

Returns the dimensions of the area containing data on a sheet (the “used range”). It tells you how many rows and columns there are and where they start and end, without having to read the entire content. Useful to know the size of the data before processing it, or to construct a dynamic range.

Calculates the minimum rectangle that spans all cells with data and returns a dictionary with its metrics. Accepts session or path — see the two modes.

Ninguno — pero debes indicar session o path.

ParameterEditorDescription
sessionexpressionExcel Open session (instead of path).
pathexpressionRoute to .xlsx (required if there is no session).
sheetexpressionName or 1-based index of the sheet. By default, the first.

Returns a Dictionary with these keys:

KeyDescription
addressAddress of the range used, e.g. A1:F120
rowsNumber of rows with data
columnsNumber of columns with data
firstRow / lastRowFirst and last row
firstColumn / lastColumnFirst and last column
Get Excel Used Range path = = asset("datos.xlsx") → output: dim
Log message = = "La hoja tiene " + dim["rows"] + " filas y " + dim["columns"] + " columnas"