Read Excel Cell
Read Excel Cell
Section titled “Read Excel Cell”Type: excel-read-cell · Package: Excel Activities v1.0.6 · Output: object
Reads the value of a single cell. Use it when you only need one specific value: a total in B10, a date in A1, a configuration parameter in a fixed cell.
How it works
Section titled “How it works”It returns the value of the given cell (cell) of the sheet, with its type: unlike reads into a DataTable, a number arrives as a number and a date as a date. Accepts session or path — see the two modes.
Read-only: in fast mode it does not modify the file.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
cell | string | — | Cell address, e.g. "B3". |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanExcelSession | — | Excel Open session (instead of path). |
path | string | — | Path to the .xlsx (required if there is no session). The file must exist. |
sheet | string | int | — | Sheet name or 1-based index. If omitted, the first sheet. |
Output
Section titled “Output”Returns an object with the cell’s value:
| Cell content | Returned value |
|---|---|
| Number (including whole numbers) | double — 1500 arrives as 1500.0 |
| Date | DateTime |
TRUE / FALSE | bool |
| Text | string |
| Formula | Its result, with that result’s type |
| Excel error | The error text, e.g. "#DIV/0!" |
| Empty | null |
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'cell' is required. | cell is missing. |
'session' or 'path' is required. | Neither session nor path is set. |
File not found. | path does not exist. |
'…' is not A1 address or workbook named range. | cell is not a valid address (e.g. "1A"). Use the form "B3". |
There isn't a worksheet named '…'. | No sheet has that name. |
There isn't a worksheet associated with that position. | The sheet index does not exist (or the name is just a number and was taken as an index). |
Example
Section titled “Example”Read Excel Cell path = asset("config.xlsx") sheet = "Settings" cell = "B2" → output: limitIf condition = !isNull(limit) && toNumber(limit) > 1000 └─ then: Log message = "High limit"Related activities
Section titled “Related activities”- Write Excel Cell — write a cell.
- Read Excel Sheet — read the whole sheet at once.
- Find Excel Cell — find a cell by its value.