Mini Spreadsheet

Tiny spreadsheet with a real formula engine — type =SUM(D2:D4) and watch dependents update.

A1
fx
ABCDEFGH
1
2
3
4
5
6
7
8
9
10
11
12

Try: =SUM(D2:D4), =AVG(B2:B4)*1.1, =MAX(C2:C4)-MIN(C2:C4). Cycles show #CYCLE!.

Prompt used
Build a Mini Spreadsheet in React with:
- 8 columns (A-H) x 12 rows grid, click to select, Enter/F2 to edit
- Formula engine with =SUM, =AVG, =MIN, =MAX, =COUNT, +/-/*/, parens, cell refs (A1) and ranges (A1:A5)
- Recursive-descent parser + tokenizer (no eval, no libs)
- Dependency tracking via on-demand evaluation with a memo cache; detects cycles -> #CYCLE!
- Distinct error display: #REF!, #DIV/0!, #CYCLE!, #ERROR!
- Arrow keys move selection, Tab moves right, Enter commits and moves down
- Persists to localStorage via useLocalStorageState
- Dark theme, purple accents, monospace cells