WarUI

Cell reference grammar (A1, absolute and ranges)

GRID-A13-F03P0baselinePlanned

This feature defines how A1-style references map onto grid rows and columns. It covers relative references (A1), absolute and mixed references ($A$1, A$1), ranges (A1:C5), whole columns and rows (A:A, 2:2), and unions. Column letters follow the visible column order or an explicit mapping, so formulas stay meaningful in a data grid.

Planned. This page shows the specification from issue #192. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A 10x6 grid with column letter headers and row numbers shown. A reference input box highlights the cells it resolves to.

Expected behavior

Typing B2:D4 highlights a 3x3 block. Whole-column A:A highlights the full column. Hiding column B shifts the letters in 'visual' mode but not in 'columnId' mode, and the demo shows the difference.

Planned API surface

option: formulas.referenceMode ('visual'|'columnId')option: formulas.columnLetterMapoption: formulas.rowAddressing ('index'|'rowId')method: formulaEngine.resolveReference(ref)method: api.getCellAddress(rowId, colId)

Acceptance criteria

  • Relative, absolute, mixed, range, whole-column and whole-row references all parse and resolve correctly. (pending)
  • Reversed ranges (C5:A1) normalize to A1:C5. (pending)
  • Column letters beyond Z continue as AA, AB and so on, up to the configured maximum. (pending)
  • In 'columnId' mode, hiding or reordering columns does not change what a formula resolves to. (pending)
  • An out-of-bounds reference resolves to #REF!. (pending)