WarUI

Formula-aware copy, paste and fill

GRID-A13-F17P1baselinePlanned

Copying a formula and pasting it elsewhere shifts its relative references while keeping absolute references fixed, as in spreadsheets. The fill handle and Ctrl+D or Ctrl+R repeat formulas with adjusted references. Users can choose to paste values only, formulas only, or both.

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

An orders grid with one formula in D2 and empty cells in D3:D20.

Expected behavior

Filling down produces =B3*C3, =B4*C4 and so on. A $B$1 reference stays fixed. Pasting into an external spreadsheet carries the formulas, and pasting values only stores numbers.

Planned API surface

option: formulas.pasteMode ('formulas'|'values'|'both')method: api.fillRange(source, target)event: pasteFormulasclipboard: text/plain and text/html with formula metadata

Acceptance criteria

  • Relative references shift by the paste offset, and absolute parts stay unchanged. (pending)
  • A shift that goes out of bounds yields #REF!. (pending)
  • Clipboard HTML includes formulas when pasteMode includes formulas. (pending)
  • Ctrl+D and Ctrl+R work from the keyboard. (pending)