Agents & AI
Analyzing a spreadsheet with free AI on your own computer: pasting the sheet into the chat got 0 of 425 figures right; asking for the query got up to 100%
5 local models, 24 questions on a sales sheet: with the sheet pasted in, not one figure was right; when they wrote the query, 79.2% were, and gpt-oss 20B got all 120.
- Date
- Dec 2, 2026
- Reading time
- 8 min
- Result
- Sheet pasted into the chat: 0 of 425 figures correct • Query written by the AI: 79.2% of 600 answers • gpt-oss 20B with a query: 100% (120 of 120), 1.36 s per question
Translated from the Spanish original. The code, data and READMEs on GitHub are in Spanish.
If you paste your sales sheet into a free AI running on your computer and ask how much you invoiced, it makes the number up: of 425 answers that called for a figure, the five models tested got 0 right. If instead you ask it to write the query and let the sheet do the math, they are right 79.2% of the time, and gpt-oss 20B got all 120 answers out of 120 right at 1.36 seconds per question (median). Measured on 2 December 2026 on an Apple M1 Max laptop, with a 120-line invoice sheet from a made-up distributor.
“Can I ask my Excel file questions with AI?”, “How do I analyze Excel data with ChatGPT?” and “Is there a free AI that does it without uploading my data?” come up in every management team. Tools exist that connect a local model to a spreadsheet, but we found no measurement of how many answers each approach gets right with the questions a small business actually asks. Here it is.
Definitions
- Local model: an AI model you download once and run on your own computer, with no account, no pay-per-use and without the sheet leaving the company. Here they run with Ollama, a free program.
- Pasting the sheet: copying the whole sheet into the message and asking. It is what almost everyone does the first time. The model has to read all 120 rows and do the math “in its head”.
- Asking for the query: the model only sees the column names, what each one means and three sample rows, and writes a query, an instruction in SQL (the standard language for asking a table questions) such as “add up the amount for the February rows”. DuckDB runs that query: a free program that reads spreadsheets and databases and does the math exactly.
- Silent error: an answer that looks right, a figure or a name, and is wrong. It is the one that matters, because nobody sees it unless they check.
Hypotheses
- With a small sheet (120 rows) that fits entirely in the message, pasting it gives answers as good as asking for the query.
- The largest model gets more right with both methods.
- When the AI writes a wrong query, it fails visibly (the query does not run), not with a wrong figure.
Setup
- The sheet: 120 invoice lines from Q1 2026 for a made-up hospitality supplies distributor: 58 invoices, 15 customers in 5 Spanish provinces, 3 sales reps, 10 products in 4 categories, 0, 5 or 10% discounts, and invoices paid or outstanding. An invoice can have several lines, as in any export from an invoicing program.
- 24 management questions (in Spanish), each with its correct answer computed by hand in SQL: total invoiced and invoiced in February, how much is outstanding, which customer buys most, which rep sold most in March, average amount per invoice, coffee’s share of revenue, how many invoices exceed €300, which customers bought in January but not in March… 17 ask for a figure and 7 for a name.
- Five free models: Qwen2.5 3B and Qwen3 8B (Alibaba; Qwen3 without reasoning mode), Gemma 3 4B (Google), Llama 3.1 8B (Meta) and gpt-oss 20B (OpenAI; it always reasons before answering, here at the minimum).
- Two methods, same questions: pasting the sheet (6,232 to 8,161 tokens per message, depending on the model; a token is a piece of a word) or asking for the query (457 to 521 tokens). With the pasted sheet, the model answers with just the figure or the name.
- Five passes of the 24 questions per model and method: 1,200 answers. Temperature 0 (always the most likely answer), one question at a time, with Ollama 0.40.15 and DuckDB 2.0.1.
- Hardware: Apple M1 Max laptop with 64 GB, macOS 26.6.2, plugged in. The measurement took about 24 minutes.
Results
Accuracy and speed
| Model | Asking for the query: correct | Silent errors | Queries that fail to run | Seconds per question | Pasting the sheet: correct | Seconds per question |
|---|---|---|---|---|---|---|
| gpt-oss 20B | 100% | 0 | 0 | 1.36 | 8.3% | 1.34 |
| Qwen2.5 3B | 79.2% | 25 | 0 | 0.50 | 0% | 0.26 |
| Qwen3 8B | 75.0% | 20 | 10 | 1.10 | 12.5% | 0.56 |
| Llama 3.1 8B | 70.8% | 30 | 5 | 0.55 | 4.2% | 0.41 |
| Gemma 3 4B | 70.8% | 35 | 0 | 1.33 | 12.5% | 0.30 |
| Total | 79.2% (475 of 600) | 110 | 15 | 7.5% (45 of 600) |
Percentages over 120 answers per model and method (24 questions × 5 passes). Seconds are medians, from asking to receiving the answer; with the query, running it in DuckDB takes milliseconds and does not change the figure. Answers were almost identical across the five passes: a model that gets a question wrong gets it wrong every time.
- Pasting the sheet does not work for figures. Of the 425 answers that called for a figure (17 questions × 5 models × 5 passes), none was correct. All 45 correct answers were names (the rep who sold most in March, the province with the lowest revenue), which can be guessed from a quick look. Qwen3 8B said the quarter added up to €1,444.44 (it was €17,907.40) and gpt-oss 20B answered “1 234 567,89”, a placeholder figure. On two questions, gpt-oss 20B ran out of its limit while reasoning and never answered (10 answers across the five passes).
- Asking for the query multiplies the hit rate: from 7.5% to 79.2% overall, and 58.3 to 91.7 points higher depending on the model. DuckDB does the math and it is exact; the risk shifts to whether the AI understands the question.
- gpt-oss 20B got all 120 answers right with the query, at a median of 1.36 s per question. The others got between 20 and 35 answers wrong.
Where they go wrong when writing the query
| Most common error | Wrong answers (of 600) | Example |
|---|---|---|
| Reading “invoiced” as “paid” | 35 | Llama 3.1 8B and Qwen3 8B added “paid invoices only” to the quarter’s total, to what Ana invoiced in Navarre, or to what one customer was invoiced |
| Grouping invoice lines wrongly | 35 | “Average amount per invoice” computed per line; “how many invoices exceed €300” answered with the number of lines on one invoice |
| Queries that fail to run | 15 | Qwen3 8B searched for 29 February 2026, which does not exist, and used a function from another database program |
- Silent errors are the majority. Of the 125 wrong answers with the query, 110 returned a figure or a name that looked right and only 15 failed visibly. Qwen2.5 3B, for example, answered what was invoiced in February, but only the paid part: €4,001.24 instead of €4,519.88.
- Per-invoice questions are the hard ones: the four that require grouping each invoice’s lines (how many invoices there are, average amount per invoice, the largest invoice and how many exceed €300) were answered correctly in 65 of 100 answers.
- A question with two conditions was almost always missed: “How much did Ana invoice to customers in Navarre?” was right in 5 of 25 answers. Gemma 3 4B made up a specific customer to filter on and Qwen2.5 3B looked for “Navarra” in the customer name.
What it means for a business
- Hypothesis 1: not met. Even though the sheet fits entirely in the message, pasting it gave a 7.5% hit rate and not one correct figure. A language model does not reliably add up 120 rows if it cannot write out the steps, and it nearly always answered with a figure instead of warning: only gpt-oss 20B said, on some questions, that it could not calculate it.
- Hypothesis 2: partly. gpt-oss 20B, the largest, was the best with the query (100%), but Qwen2.5 3B, the smallest, got more right than Llama 3.1 8B, Qwen3 8B and Gemma 3 4B. With the pasted sheet, they all fail.
- Hypothesis 3: not met. 110 of the 125 failures with the query were plausible figures or names. The typical error is not technical but one of interpretation: “invoiced” is not “paid”, and a line is not an invoice.
For a management team that wants to ask questions about its sales without building pivot tables, the conclusion is clear: the AI must write the query and the sheet must do the math. Pasting your invoicing program’s export into a chat and trusting the number it returns is the fastest way to present a made-up figure at the meeting. And since the sheet never leaves the computer, the method also works with customer data you would rather not upload to an outside service.
When to use each option
- gpt-oss 20B writing the query: the best option measured (120 of 120). It takes 13 GB of disk and needs a computer with plenty of memory (this one has 64 GB).
- 3B to 8B models writing the query: 70.8% to 79.2% correct. Only with someone who reads the query before trusting the figure, or for simple questions (a total, a count with one condition). Qwen2.5 3B has a research license: check it before using it in a business.
- Pasting the sheet into the chat: not for figures. At most, to get an idea of which columns there are.
- In every case: write down what each column means (“amount is what was invoiced, paid or not”; “an invoice has several lines”), always show the query next to the figure, and check the first answers against a report you already know.
Limitations
- A small, made-up sheet. 120 rows, 12 clean columns and names without typos. A real export has thousands of rows, cryptic column names and empty cells; with thousands of rows the sheet would not fit in the 8,192-token context used here, so pasting it can only get worse. Formulas, multiple sheets and related tables were not tested.
- With the pasted sheet, no written steps. We asked for the answer only, like someone asking “how much did I invoice?”. A model that reasons in writing row by row might do better, at the cost of much more time; gpt-oss 20B reasons internally and still got 8.3% right. No paid cloud AI was tested (ChatGPT, Claude or Gemini can run code on the sheet, which is the same idea as asking for the query).
- One way of asking. The instructions, column descriptions and questions are the same for every model. With more explanation (for example, “invoiced includes outstanding amounts”) the small models would do better; this was not measured.
- Automatic grading. A figure with decimals counts as correct within a difference of 0.05. For the month question, the English name (“March”) returned by two models with a correct query was also accepted; that change was decided after reading the answers and affects 10 of the 1,200, all recorded in the results.
- A single laptop: Apple M1 Max with 64 GB, plugged in, with other apps open. Each model used Ollama’s default quantization. On a computer with less memory, gpt-oss 20B may not fit and times will be longer.
How to reproduce it
Code, the made-up sheet, the 24 questions with their correct answers and the 1,200 answers with every generated query: yeswelab-laboratorio/analizar-excel-con-ia-local on GitHub (code and README in Spanish). It needs Python, DuckDB and Ollama on the same machine, with no accounts or keys; the first run downloads the models. To try it with your own sheet, change the sheet, the column descriptions and the questions.
Related
- Excel, Airtable or n8n: which tool for which task
- What Airtable is and what a database is
- Can a free AI on your computer read your invoices?
Want to know whether an AI can answer your management team’s questions about your own data? Commission the experiment with your sales export and 20 real questions, and we will tell you which model gets them right, where it goes wrong and what you need to define before trusting the figure.