Google Sheets — Read cell
Google Sheets — Read cell
Section titled “Google Sheets — Read cell”Type: googlesheets-read-cell · Package: Google Sheets Activities v1.0.5 · Output: object
Reads the value of one specific cell. Use it when you only need a single value: a total, a status, a setting someone adjusts in the sheet.
How it works
Section titled “How it works”Reads the cell cell (A1 notation) in the sheet sheet (the first one if empty) with one call to Google. The value arrives as displayed in the sheet: a number formatted as 1,500.00 arrives as the text "1,500.00", and a formula as its result.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
cell | string | — | Cell address in A1 notation, e.g. B3. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanGoogleSheetsSession | — | Session from Google Sheets — Open. Inside Open’s body it is inherited and you can leave it empty. |
sheet | string | — | Sheet name. If empty, the first sheet is used. |
Output
Section titled “Output”Returns the cell value as text (string), or null if the cell is empty. To calculate with it, convert it: num(limit). Check for empty with isNull(value).
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'cell' is required. Example: A1, B3. | cell is empty or its expression returned null. |
No Google Sheets session available. Provide 'session' from a googlesheets-open activity, or place this activity inside the Open activity's body … | The activity is outside Open’s body and received no session. Move it inside the body or pass the saved session. |
The service sheets has thrown an exception. HttpStatusCode is … | Google rejected the call: missing sheet or range, no access, expired token or quota exceeded. See Google API errors. |
Example
Section titled “Example”Google Sheets — Read cell session = book sheet = "Config" cell = "B2" → output: limitIf condition = !isNull(limit) && num(limit) > 0 └─ then: Log message = "Configured limit: " + limitRelated activities
Section titled “Related activities”- Write cell — write one cell.
- Find cell — find a cell by its value.