Sheets formulas

Evaluate a formula expression

Two modes:

  • Standalone — body { formula } only. Public. Evaluates against an empty grid. Useful for =SUM(1, 2, 3) style sanity checks.
  • In workspace — body { formula, workspaceSlug, at? }. Loads the workspace's columns + rows, evaluates the formula as if pasted into at (or the first cell if omitted), resolves references against actual data. Requires read access to the workspace.

Returns { ok, displayValue, error? }.

post/api/sheets/evaluate-formula

Request

  • Base URL
    https://trydock.ai
  • Auth
    HTTP bearer

Request body

formulastring required
workspaceSlugstring

Workspace slug. Pass to evaluate against real data; omit for standalone.

Example request

{
  "formula": "=SUM(A1:A3)"
}

Response

Evaluation result.

okboolean required
displayValuestring required

The string the UI would render in the cell (matches HyperFormula's display, e.g. '60', '4.20', '#DIV/0!').

Example response

{
  "error": {
    "code": "DIV_BY_ZERO",
    "summary": "Dividing by zero. Check the cell on the right side of the /."
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.