Can ChatGPT Read Excel Files? What It Actually Does
Yes, ChatGPT can read Excel files, using a sandbox called Code Interpreter. A worked example across two sheets, where the reading goes wrong, and what to check.
Yes — ChatGPT can read an Excel file properly, not just guess from a filename or a pasted screenshot. Attach an .xlsx, .xls or .csv file and it opens the actual rows, columns and sheet names using a sandbox OpenAI calls Code Interpreter, running real code against the data the way an analyst would. That is the mechanism, and it is genuine reading rather than a trick. What is less widely understood is which parts of a real, slightly messy workbook survive that process correctly, and which parts it quietly gets wrong while sounding just as confident either way.
What happens when you upload it
Behind the chat window, ChatGPT writes and runs Python — usually with the pandas library — against the file you attached, in a sandboxed environment rather than on your own machine. That is why it can answer a specific question about the data rather than only describing what a sheet looks like: it is executing code, not summarising an image. Can you upload Excel to ChatGPT covers the mechanics of the upload itself and the prompt discipline that makes the answer worth trusting; this piece is about what the reading step gets right and wrong once the file is open.
It can see every sheet in a workbook, not only the first one, and it can be asked to work across them. It reads from the snapshot you attached, though — not a live link to your file. Edit the sheet afterwards and ChatGPT knows nothing about the change until you upload it again, which matters if you are asking it about a workbook that updates daily rather than one you just finished.
What it gets right, and what it doesn't
It is genuinely good at reading a clean table: one header row, consistent column types, no merged cells. It is noticeably worse the moment a workbook looks like something a real person built under time pressure — a title row above the headers, a blank spacer column, a mix of dates typed as text and dates typed as dates, an ID column where some rows have leading zeros. Any of those can make it misread a column's type, most often turning a text ID into a number and silently dropping the leading zero — which breaks any comparison that depends on the ID matching exactly.
It does not run your Excel formulas. It reads whatever value a formula last calculated, then does its own arithmetic in Python from there — it cannot see the formula behind a cell unless you ask it to, and it will not write a live formula back into your file. That is the opposite of something like AutoSum in Excel, which inserts a real formula that recalculates whenever the sheet changes; a number ChatGPT gives you in the chat is a one-off answer with nothing behind it that updates. If what you actually want back is a formula you can paste into the sheet yourself, that is a narrower and more reliable request — see turning an Excel formula into text for getting a usable formula string rather than a chat answer that goes stale the moment the data changes.
A worked example across two sheets
Say a workbook has two sheets: Orders (order_id, customer, amount) and Refunds (order_id, refund_amount). The useful question is which orders were refunded for more than they were sold for — a data-entry error worth catching before it reaches an accounting close.
Weak prompt: "What can you tell me about this spreadsheet?"
Better prompt: "This workbook has two sheets, Orders and Refunds, both keyed on order_id. For every order_id that appears in both sheets, tell me whether the refund amount is larger than the order amount. List only those rows, with both figures shown side by side. Do not total anything else."
The second version works because it names the two sheets, the shared key joining them, and the exact condition worth flagging — a task that plays to what the tool is actually built for: matching and filtering rows against a stated rule, not inventing one. OpenAI's own prompting guidance and Anthropic's both make the same point in their own documentation — state the task and its boundary in the same sentence, rather than a bare instruction and hoping the model infers where to stop. Before trusting the list it returns, check that the order_id column matches type in both sheets; if one sheet stores it as text and the other as a number, some genuine matches will silently fail to join, and the output will look complete while quietly missing rows.
Where the confidence outruns the accuracy
The failure mode is not a crash or a refusal. It answers fluently, and the answer can still be wrong — a row it should have matched but didn't because of a type mismatch, a count that is off by one, a total volunteered with more certainty than the underlying join deserves. This is a documented property of how these models generate text, not an occasional bug: they produce a plausible-sounding continuation, and a plausible number reads exactly like a correct one until you check.
There is a second, quieter failure worth knowing before you ask a follow-up question: if you preview the answer you expect — "I think about three orders look overpaid, is that right?" — research on how these models respond to a stated expectation has found they tend to agree with the number you handed them rather than checking independently. Ask the question without previewing the answer you're hoping for, and the check is worth more.
Let the model find the rows that match a rule you stated. Let a formula do the arithmetic. Keep the two apart.
Checks before you use the output
- Recompute the join yourself with an actual formula — a helper column using XLOOKUP or VLOOKUP against the same two sheets — before repeating the model's list to anyone. Checking an AI answer when you are not the expert is the general habit, and a spreadsheet claim is exactly the kind that takes a minute to confirm and does real damage if it is wrong.
- Open two or three of the flagged rows yourself and read the raw cells. A model can point you toward something worth a look; it cannot certify that the row is actually wrong without you checking the source values.
- Check that the key column — order_id here — is formatted the same way in both sheets before trusting a match count. A number-versus-text mismatch on the join key is the single most common reason a row silently drops out.
- If the real question is a genuine statistical test on the numbers rather than a row-by-row match, the best AI for statistics covers which part of that job is safe to hand to a model and which belongs in a proper test.
- For a genuine optimisation across many rows — allocating a budget, minimising a cost — that is a job for Solver, not a chat upload; use the model to help frame the constraints, not to guess the answer.
What to do Monday
Take a workbook you already have with more than one sheet and ask a specific, checkable cross-sheet question — not "analyse this" but something with a clear right answer you can verify in a minute, like the overpaid-refunds example above. Compare the list it gives you against a quick XLOOKUP of your own on the same two sheets. If Excel's own Quick Analysis tool can already answer the question with a formula, that's usually the safer route — reach for a chat upload for the matching and filtering work a formula can't easily express, not for arithmetic Excel already does natively. If you end up running this kind of check regularly, decide in advance what you would look at to notice it silently started missing rows — the same monitoring principle behind NIST's AI Risk Management Framework, scaled down to one workbook instead of a whole system.
Coursium teaches this kind of practical judgement directly — asking a tool a specific question and checking what comes back before anyone acts on it. Stay ahead of AI by learning the tools on your phone.