Skip to content
Agent Tools

viewRange

Render a worksheet rectangle as a compact text grid — by default the displayed (number-formatted) values, what a human sees in the cells — with column letters and row numbers. Use this FIRST to scan or orient in an area (a financial statement, a block, a table): one call returns the whole rectangle instead of reading it cell-by-cell. Pass show to audit other layers of the same grid: raw unformatted values, a style property (’-’ marks unset cells), or the formula structure — formula cells get a legend key, identical fills share one key, so a miscolored cell, a wrong format, or a hardcoded override stands out against the value grid you just read. For precedents/dependents or error provenance, use inspect. Returns at most 500 cells; a larger rectangle renders the cells that fit and names the rows or columns that remain — request those in a follow-up call.

Examples:

  • Range: { “reference”: “B40:N80” }
  • Sheet-qualified: { “reference”: “‘LBO Model’!B40:N80” }
  • Single cell: { “reference”: “C12” }
  • Font colors: { “reference”: “B40:N80”, “show”: “fontColor” }
  • Formula structure: { “reference”: “B40:N80”, “show”: “formula” }
ParameterTypeDescription
referencestringrequiredA1 range to view, sheet-qualified where needed (e.g. “‘LBO Model’!B40:N80”). A single cell is allowed.
show"value" | "rawValue" | "fontColor" | "fill" | "numberFormat" | "formula"optionalWhat each cell renders. ‘value’ (default): formatted display values; a † marks a number whose format hides that it is numeric (a date, an accounting dash) — a legend below the grid explains it. ‘rawValue’: underlying unformatted values. ‘fontColor’/‘fill’/‘numberFormat’: that style property (’-’ when unset; colors as lowercase hex for RGB, raw token for theme/preset/indexed colors). ‘formula’: formula cells render a short key like [1] with a legend below the grid — formulas are compared in R1C1 form, so a formula filled across a range shares one key and anomalies stand out; non-formula cells show their raw value, so hardcoded overrides stand out too.