Why you shouldn't vibe code a spreadsheet engine

Hörður Ragnarsson13 November 2026 · 4 min read

I get why it's tempting. You're building something with AI and spreadsheets, and you need formulas to calculate, and the thought pops up that your LLM could probably write you a formula evaluator while you grab another cup of coffee. You're not in a rush anyway. You need to open a fresh bag of coffee beans and brew another pot. And honestly (to borrow my agent's favorite word), it could probably pull it off. It could fairly quickly support the formulas you know and as far as you could tell it just works.

Fast forward a few weeks and you're deep into another session with the latest frontier model running at maximum effort, ultracode and all. You've resorted to eating coffee beans straight from the bag, and somehow you and your agent still can't figure out how to calculate your co-worker's spreadsheet the same way Excel does.

Why is that? Well, some of what Excel does is just weird. And unless you've spent years building a spreadsheet engine, you probably have no idea just how weird.

Dates are a good example. Excel thinks the 29th of February 1900 existed. It didn't, 1900 wasn't a leap year, but Lotus 1-2-3 thought it was, Excel copied it so Lotus files would keep working, and our engine copies it too so dates line up. Most people who work with spreadsheets know that one. Fewer know that Excel doesn't fully agree with itself about it. =DAY(60) says that day is the 29th, but ask =EOMONTH(60, 0) for the last day of the same month and you get the 28th.

Then there's the stuff an LLM would get wrong without ever noticing, because it isn't written down anywhere. Ask it to write an evaluator in JavaScript and it will reach for the language's built-ins, because why wouldn't it. But in Excel, =ROUNDDOWN(10^15+5, 0) rounds up to 1000000000000010. =LEFT("abcdef", 0.9999998) gives you "a", because almost 1 counts as 1. And =DATEVALUE("Jul 32") is the 1st of July 1932, but type Jul 32 into a cell and you get 2032. Nothing crashes, the numbers just come out wrong, and you don't really know why.

Chrome console (JavaScript)
Math.floor(10**15 + 5)
1000000000000005
"abcdef".slice(0, 0.9999998)
""
new Date("Jul 32")
Thu Jul 01 2032
new Date(1900, 1, 29)
Thu Mar 01 1900
Excel
FormulaResult
=ROUNDDOWN(10^15+5, 0)1000000000000010
=LEFT("abcdef", 0.9999998)a
=DATEVALUE("Jul 32")7/1/1932
=DATE(1900, 2, 29)2/29/1900
JavaScript's built-ins against Excel

And these aren't beginner mistakes that a better model will grow out of. We recently ran 13 spreadsheet engines against Excel on about 102,000 test cases (here's how). These aren't weekend projects. They're established engines, and even the better-performing alternatives disagree with Excel in roughly 4–10% of cases.

EngineVersionCompatibilityFailures per 1,000, log scale
1GRID19.0.019.0.099.9%1.2
2GridCraft0.18.00.18.095.8%42
3IronCalc0.9.10.9.195.2%48
4SpreadsheetGear9.3.859.3.8594.4%56
5Mog1.0.01.0.091.5%85
6SpreadJS19.2.519.2.591.3%87
7Univer1.4.01.4.091.2%88
8Google SheetsWeb, Nov 9, 2026Web, Nov 9, 202690.6%94
9LibreOffice26.8.2.226.8.2.287.4%126
10HyperFormula3.5.03.5.082.9%171
11Gnumeric1.12.621.12.6282.8%172
12Apache POI6.0.06.0.052.9%471
13fast-formula-parser1.0.191.0.1947.0%530
1101001,000

How often each engine disagrees with Excel, from the GRID Spreadsheet Benchmark

Your agent will write tests for its engine, and they'll pass. And that's how a vibe-coded spreadsheet engine silently fails. Those tests only check what the agent thinks Excel does, not what Excel actually does. Even the tests written for mature spreadsheet engines don't always agree with Excel. Some differences are intentional, others are bugs or behaviors that have changed over time.

So does it really matter if a spreadsheet engine gets a few edge cases wrong? The problem is that you won't necessarily know when it happens. The numbers will look just as convincing as the correct ones.

That's the problem I built Tafla around. Ask an AI a question with numbers in it and you get an answer you have to take its word for. In Tafla the model only writes the formulas, our engine does the math, and every step is laid out where you can check it and change the numbers. When I tested the same questions without the engine, the final answers were almost always right, but in 20 to 30% of sessions the steps behind them didn't add up. You'd never have known from the answer alone.

With the engine
Answer was right285
Every step added up285
Model writes its own code
Answer was right283
Every step added up227
Model does its own math
Answer was right283
Every step added up201
Out of 285 Tafla sessions for each approach, how often the final answer was right and how often every step behind it added up

So what should you do instead? If you want people's Excel files to behave like they expect them to, the answer is pretty clear by now. Don't vibe code a spreadsheet engine, pick one that has already been checked against Excel and let your agent use it instead of writing one.

To be fair, if you control every formula and it's mostly arithmetic, you're building a calculator, and you can absolutely vibe code a calculator. But the moment you open someone else's workbook you're in Excel's world, with forty-odd years of decisions baked into it.

If you want somewhere to start, our engine is free to evaluate, and your agent can probably wire it up before the next pot finishes brewing. Chasing every quirk Excel has carried for its lifetime is a bit like that planet scene in Interstellar. You go down for what feels like an hour and come back to find years have gone by. Spend that time instead on what makes your product stand out from the rest.

News

Updates and announcements

27.11.2026

The Python was right. The spreadsheet was wrong.

On 400 spreadsheet tasks, the agent without an engine scored 78% and the agent with GRID scored 90.75%. When we required formulas where the reference workbook had formulas, the same workbooks scored 54.25% without an engine and 87% with GRID.

19.11.2026

How AI builds a spreadsheet: openpyxl, then 430 MB of LibreOffice

In September, Simon Willison went poking around his disk and found 1.7 GB of runtime inside OpenAI's Codex desktop app, since renamed ChatGPT. Next to Python, Node and git sat a complete headless LibreOffice: 430 MB of office suite, shipped so the agent can work with documents. This did not surprise us. We have watched this pipeline since the first AI spreadsheet experiments, and it is still how most of the industry builds spreadsheets with AI. It made sense as a stopgap. It doesn't anymore: next to an engine built for the job, it is less accurate, far slower and more than a hundred times bigger. The recipe Ask an AI agent for an Excel model and it will almost always write the file with openpyxl, the Python library all over its training data. openpyxl writes formulas but cannot calculate them, so the formula cells hold no values. Anything that reads the stored values sees blanks: the Python data library pandas, file previews, and the agent itself, checking its own work. And the model writes formulas the way a person types them, not the way Excel stores them. Leave out the _xlfn. prefix Excel expects on XLOOKUP inside the file and the cell opens in Excel as #NAME?. Write a LET without its _xlpm. prefixes, or a spill reference like A1#, and Excel greets the whole file with "We found a problem with some content". So the pipeline needs something to calculate the file, and the answer is nearly always LibreOffice. Anthropic's public xlsx skill runs LibreOffice to recalculate the workbook. Alibaba's QwenPaw agent ships an adapted copy of the same script. Moonshot's Kimi checks its files against LibreOffice's recalculation, according to an extracted copy of its skills. OpenAI bundles the whole suite into its desktop app. LibreOffice is free, it is already there, and it opens xlsx. None of that means it calculates like Excel. So how close does it get? Missing one case in eight Last week we published the GRID Spreadsheet Benchmark: over 100,000 test cases from eight open source test suites, 13 engines, every case checked against Excel itself. LibreOffice matches Excel on 87.4% of them. That sounds respectable, and LibreOffice Calc is a good spreadsheet app. The test is deliberately hard: it is built from edge cases, not the SUMs that fill most of a real model. But edge cases are where a model goes quietly wrong, matching Excel on them is a high bar, and the last few percent are where the hard work is. 87.4% is 126 misses in every 1,000 cases. The GRID engine gets 1.2 wrong. LibreOffice isn't sloppy. It is a different spreadsheet app with its own opinions. On its own project's test suite it agrees with Excel only about 84% of the time, because many of those tests expect LibreOffice's answer: it converts units Excel has never heard of, and it finds interest rates where Excel gives up with #NUM!. Of the nearly 500 Excel functions in the benchmark, only 16 pass every test in LibreOffice. In GRID, 439 do. Then the tool starts dictating the spreadsheet. Anthropic's skill tells the model to never use XLOOKUP, XMATCH, SORT, FILTER, UNIQUE or SEQUENCE, saying the LibreOffice it runs can't evaluate them. LibreOffice has handled them since 2024, but the rule stands: the agent builds an older, worse spreadsheet to suit its calculator. "We found a problem with some content" In most of these pipelines, when LibreOffice recalculates a file, it also saves it, and it saves it the way LibreOffice understands it. Usually the file still opens in Excel. Sometimes it doesn't. Take the sensitivity table, a fixture of every financial model: a what-if data table showing, say, the implied share price under different WACC and terminal growth assumptions. Put a workbook with one through a pipeline that saves through LibreOffice, like QwenPaw's, open it in Excel, and you get "We found a problem with some content". LibreOffice has written the table back as a formula Excel doesn't have. Click Yes, and Excel repairs the file by turning every cell of the table into a fixed number. The numbers are right for today's inputs. Change the WACC and nothing moves. The model still looks finished. It just stopped being a model. Anthropic's skill was recently changed to recalculate on a copy and write only the values back into the file. That is a sensible patch, and an admission that LibreOffice can't be trusted to save the file. It is still trusted to calculate it, and to tell the agent the file is fine. That trust is misplaced too, because LibreOffice waves through problems it didn't cause. Ask an agent for a table with years as column headings, 2025 and 2026, as in nearly every financial model. openpyxl writes the headings as numbers, and Excel requires table headings to be text. Name a table Q1 and it is the same story, since Excel reads that as a cell address. LibreOffice opens these files, recalculates them without complaint and saves them. The agent's check passes. Excel opens the file with "We found a problem with some content". 430 MB and a second and a half Even when it gets the answer right, LibreOffice is the wrong shape for the job. Every check boots a desktop office suite in headless mode, loads the file, calculates, and writes the file back. On nearly 1,800 benchmark workbooks, run on the same machine, that took a median of 1.6 seconds per workbook. The GRID engine took 18 milliseconds, and it doesn't need to save: it holds the workbook in memory and writes the file once, when the agent is done. These are small workbooks, so most of that time is LibreOffice starting up, and today's agent skills pay it on every check. Anthropic's starts it twice. The obvious fix is to keep it running. In a separate test it still took about 80 milliseconds per workbook, and now the client keeps an office suite running in the background whenever a spreadsheet might come up in any thread. Then there is the weight. ChatGPT's headless LibreOffice is 430 MB. The GRID engine is a 3.5 MB package that runs in process, in Node or in the browser. The embedded LibreOffice may actually be doing other jobs too, like rendering documents and converting them to PDF. But those jobs have lighter tools as well. SuperDoc builds, edits and renders Word documents in the browser: an engine for DOCX, the way GRID's is for XLSX. A couple of small JavaScript libraries turn DOCX into PDF without a desktop suite. However you slice it, 430 MB of LibreOffice in a client is a kludge. Calculate it right AI is about to write more spreadsheets than people ever did. Those files will be opened in Excel, sent to clients and used for decisions, and Excel is where the numbers are checked. If an agent's model shows one figure and the same file shows another in Excel, the user doesn't conclude that LibreOffice and Excel differ on a corner case. They conclude the AI got it wrong. They start rechecking every number, and they stop trusting the next model before they open it. One wrong cell is enough to spend the trust that was supposed to save them the work. The GRID engine calculates the way Excel does, in milliseconds, without an office suite attached. The benchmark and its harness are open, so check the numbers. If you build agents that write spreadsheets, talk to us.

10.11.2026

The GRID Spreadsheet Benchmark: how close do spreadsheet engines get to Excel?

Every spreadsheet solution will say it is compatible with Excel. Now we can check those claims. For eight years our job at GRID has been to build a spreadsheet engine that gives the same answer as Excel, because if a model returns different numbers nobody will trust your solution. To make sure we'd earn that trust, we had to build a test rig. Today we are opening that rig up. The GRID Spreadsheet Benchmark measures how closely an engine's formula results match Excel's. It runs thirteen engines today, the results are live on the benchmark page, and everything needed to rerun it is in a public repository. If you are choosing an engine to build on, or building one yourself, this is meant for you.

Visit our blog

Spreadsheets run the world

We run spreadsheets

2026 GRID

Developers

Get startedDocumentationLicensingGRID Labs

About us

CompanyCareersBlogContact us

Legal

SecurityPrivacy Policy
Press kit
Press kit

2026 GRID