Skip to content

Inline arrays work like ranges, MATCH/INDEX fixes, homepage showcase + Ask AI box - #6

Merged
ralyodio merged 2 commits into
mainfrom
examples
Nov 30, 2026
Merged

ralyodio merged 2 commits into
mainfrom
examples

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

User asks: the demo showed #ARG! IRR: values must be a range ("fix it if it's supposed to work"), "add some more examples, we want to showcase everything", and "we added the ask ai button right?".

  • Inline array constants ({1,2,3}) now behave like ranges in standalone evaluation (CLI eval, API/MCP eval, Ask previews): IRR, COUNTIF, ROWS, AVERAGEIFS, SUMPRODUCT and friends give Excel's answers. Workbook cells are never rewritten. Note: {3,1,2} is a ROW, so SORT/UNIQUE/TAKE on it return it unchanged exactly as Excel does; columns use ;.
  • Engine patch 0002: MATCH match_type 1 = largest value <= lookup (was first >=: MATCH(25,{10,20,30},1) gave 3, now 2); INDEX(single_row, n) picks the column like Excel (was blank).
  • Homepage: 56 examples in 9 groups (finance, lookup, dynamic arrays, LET/LAMBDA, text, dates, stats, logic, math) as click-to-run chips; Ask AI box on the page (c0mpute, checked on the engine, lands in the box); richer default demo.
  • Guard test: every homepage example is evaluated on the real engine in bun test; any error fails CI.

Tests: cargo test --release 10/10 (new arrays tests incl. MATCH/INDEX/IRR), cloud bun test 19/19.

🤖 Generated with Claude Code

ralyodio and others added 2 commits November 30, 2026 17:02
…wcase

- src/arrays.rs: for standalone evaluation (CLI eval, MCP/API eval, Ask
  preview) each {..} constant is written to scratch cells and the formula
  points at that range, so IRR({..}), COUNTIF, ROWS, AVERAGEIFS, SUMPRODUCT
  ({1,2,3},{4,5,6}) = 32 etc. behave as in Excel. Workbook cells untouched.
- patches/0002: engine MATCH type 1 returns the largest value <= lookup
  (was first >=, so MATCH(25,{10,20,30},1) gave 3); INDEX(row, n) on a
  single-row range picks the column, as in Excel.
- Homepage: 56 examples in 9 groups as click-to-run chips, an Ask AI box
  (c0mpute) on the page, a fuller default demo. A test evaluates every
  example against the real engine so a broken one cannot ship.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er process)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit ce2bcdc into main Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant