← All articles

How to Analyze a Spreadsheet with ChatGPT (and Check It)

Oct 1, 2026·9 min read·spreadsheetsdata analysisChatGPTExcel

ChatGPT can answer questions about a 4,000-row export in minutes, if it runs code on the file and you can verify the result. Two prompts, a preparation list, and a check before the numbers go into a report.

You have an export with four thousand rows, a question from your manager, and a deadline this afternoon. You can analyze a spreadsheet with ChatGPT faster than you can build the pivot tables, on one condition: the model has to run code on your file, not read it and estimate. Most bad results we see come from missing that difference. This guide covers how to tell which one happened, how to prepare the file, two prompts that produce numbers you can defend, and a short check before anything goes into a report.

What happens when you upload a file

A chatbot can handle a table in two ways.

In the first, it treats the table as text. It reads some of the rows, forms an impression, and writes numbers that look like a plausible summary. For a 30-row table pasted into the chat this is often close. For 4,000 rows it is guessing.

In the second, it writes a short Python script, runs it on the complete file in a sandbox, and reports what the script returned. The sum of a column is then a real sum.

In ChatGPT the second mode leaves a visible trace: an analysis step you can expand to see the code. If an answer contains totals and no code, treat the totals as estimates and ask again with the words "use Python on the full file."

What each tool accepts, as of October 2026, according to the vendors' help pages:

Tool Files Limits worth knowing
ChatGPT .xlsx, .xls, .csv About 50 MB per spreadsheet, depending on how wide the rows are; Free accounts get only a few uploads a day
Claude .csv on any setup; .xlsx needs "Code execution and file creation" switched on in Settings → Capabilities (available on all plans, Free included) 30 MB per file in the code environment
Gemini app .xlsx, .csv, Google Sheets 100 MB per file, up to 10 files per prompt; builds charts from uploaded sheets

There are also assistants inside the spreadsheet itself: Gemini in Google Sheets, Copilot in Excel, and Claude for Excel on paid Claude plans. They are convenient for formulas and quick edits in place. For a one-off question about an export, uploading the file to a chat is usually quicker, and the method below carries over to Claude and Gemini with small changes.

Five minutes of preparation

The code that reads your file expects a plain table. The closer the sheet is to that, the fewer silent errors you get.

  • One header row, with short names that mean something: closed_date, not Column7.
  • One table per sheet. Notes, logos, and a second table off to the right confuse the import.
  • No merged cells and no subtotal rows inside the data. A "Total" row in the middle gets counted as one more deal.
  • Dates stored as dates, amounts as numbers. A column of $1,200.00 typed as text will be skipped or misread.
  • Delete columns the question does not need, starting with names, emails, and phone numbers. Hidden tabs travel with the file too. What should never leave your machine is covered in Is It Safe to Upload Confidential Documents to ChatGPT?
  • If the workbook is messy, export the one sheet you need as CSV and upload that.

Before uploading, write down two control figures from the spreadsheet itself: the number of data rows and the sum of the main amount column. You will need them in ten minutes.

A working example: a CRM export and one question

A typical task. A sales manager has deals.csv, exported from the CRM, with the columns deal_id, owner, source, stage, amount, created_date, closed_date. The question from the director: where did third-quarter revenue come from, and what changed against the second quarter?

Resist asking that straight away. First find out what the model sees.

I've attached deals.csv, an export from our CRM.
Before any analysis, use Python to profile the file and report:

- number of rows and columns, and the column names as you read them
- the data type of each column and how many values are empty
- the earliest and latest value in created_date and closed_date
- exact duplicate rows, and deal_id values that appear more than once
- anything that looks wrong: negative amounts, amounts stored as text,
  dates in the future, a totals row inside the data

Do not clean or fix anything yet. Show the code you ran.

Compare the row count with the figure you wrote down. If they differ, stop and find out why before going further. The usual suspects: a totals row, blank lines at the bottom, or a second header halfway down from a copy-paste.

Look hard at the dates. 03/04/2026 is March 4 in one convention and April 3 in another, and the import picks one without telling you. If the latest closed_date is in December and your export ended in September, day and month are swapped. Say which format the file uses and have it re-read the column.

Once the profile is clean, ask the real question, and define every word that could be read two ways.

Now answer the question below using Python on the full file, not a sample.

Question: Which sources and which owners produced closed-won revenue in Q3,
and how does that compare with Q2?

Definitions:
- Closed-won means stage is exactly "Closed Won".
- The quarter is decided by closed_date.
  Q2 = April 1 to June 30, 2026. Q3 = July 1 to September 30, 2026.
- Revenue = sum of amount. Leave out rows where amount is empty
  and tell me how many you left out.

Return:
1. A table by source: Q2 revenue, Q3 revenue, change in dollars,
   change in percent, number of deals in each quarter.
2. The same table by owner.
3. Three observations, each with the numbers it rests on.
   Do not explain why something happened unless the data shows it.
4. The filters you applied, in plain words, with the row count after each one.

Item 4 is the part people leave out and the part that makes the answer checkable. If 4,000 rows became 3,100 after the stage filter and 1,460 after the date filter, you can see where a third of the deals went and decide whether that is right.

When the result looks wrong, the cause is nearly always a definition. Revenue by created_date and revenue by closed_date are both defensible and give different tables. Correct the definition and rerun; do not argue with the number.

Check before it goes into a report

  • The row count in the profile equals the row count in your spreadsheet.
  • The grand total in the answer equals your own SUM of the column, or the gap is explained by rows the model said it excluded.
  • One cell of the result is recomputed by hand: filter the sheet for one source and one quarter, select the amounts, read the sum in the status bar.
  • The row counts after each filter add up.
  • Five raw rows are printed next to their parsed dates, and the dates are right.
  • The code is visible. No code, no trust.
  • The file with the model's cleaned data is downloaded and kept with the report, so the numbers can be traced later.

What to trust and what to question

Task How reliable What to check
Sums, counts, averages, group totals computed by code High Filters and definitions, not the arithmetic
Cleaning: duplicates, formats, splitting columns Good Ask for a log of how many rows changed and why
Charts Good Axis start, aggregation, whether a category was dropped
Writing an Excel or Sheets formula Good Test it on three rows where you know the answer
Reading numbers from a screenshot or a PDF table Mixed Every digit against the original
"Why did revenue fall?" Low Treat it as a list of hypotheses to test, not a finding
Forecasts from a dozen data points Low The method it used and whether you would defend it

The pattern: computation is strong, interpretation is where the model fills gaps with a plausible story. We go deeper into the arithmetic side in Is ChatGPT Accurate with Numbers?

Where this breaks

Large files. A CSV beyond the size limit will not load, and one near it may time out. Aggregate in the source system first, or split by year.

Workbooks built on formulas. The code reads the values in the cells, not the logic that links them. A financial model with twelve interlinked tabs arrives as twelve tables of numbers. For questions about how the model works, paste the formulas of the sheet you care about.

Long sessions. The sandbox does not live forever. After a break the uploaded file may be gone, and some models carry on from what they remember of the earlier output without saying so. If the code step disappears from the answers, upload the file again.

Tables pasted as text. Without a file there may be no code, and the model adds the column in its head. Fine for ten rows, not for two hundred.

Sensitive data. Customer exports and payroll sheets are personal data. Strip identifiers or use a workspace your company has approved.

Causal stories. A drop in one source and a rise in another, in the same quarter, will be narrated as a shift from one to the other. The data shows two changes. Whether they are connected is your call.

For claims that are not numbers, such as market facts the model adds around your table, use the routine in How to Fact-Check AI Answers. And if you are choosing between tools for this kind of work, see ChatGPT vs Claude vs Gemini for Work.

Take this further in the practicum

Working with numbers is part of Session 3 of AI system in two weeks, the session on documents, data, and visuals. Participants bring an export from their own job, run the profile-then-question sequence live, and see where AI is reliable with figures and where it is confidently wrong. The result is a set of prompts fitted to your own reports and a verification habit that takes minutes. See how the program maps to managers and sales teams, or go to the full program on the course page.

FAQ

Can ChatGPT read Excel files?

Yes. ChatGPT accepts .xlsx, .xls, and .csv uploads and can run Python on them to calculate totals, group data, and draw charts. It reads the values in the cells. Formulas, formatting, and links between tabs are mostly lost, so a workbook built on formulas arrives as plain tables of numbers.

How large a spreadsheet can ChatGPT analyze?

As of October 2026, OpenAI's help center gives a limit of about 50 MB for spreadsheets and CSV files, depending on how wide the rows are. Free accounts are limited to a few file uploads a day. For larger exports, aggregate the data in the source system or split the file by period.

Is ChatGPT accurate when analyzing data?

The arithmetic is reliable when the answer comes from code run on the full file, which you can confirm by expanding the analysis step. Errors come from elsewhere: misread dates, text stored as numbers, duplicate rows, and unclear definitions. Compare the row count and one total with your spreadsheet before using the result.

Should I paste the table into the chat or upload the file?

Upload the file. A pasted table is treated as text, and the model may estimate totals without running any code. That is acceptable for a dozen rows and unreliable for hundreds. With an uploaded file you can ask for Python on the full data and see the code.

Can ChatGPT clean my spreadsheet and give it back?

Yes. It can remove duplicates, fix formats, split or merge columns, and return a new .xlsx or .csv to download. Ask for a log of what changed and how many rows were affected, and keep your original file. Never let the cleaned version overwrite the only copy.

Next cohort: November 16–25

AI system in two weeks

A live practicum for people who work with text, clients and documents. Four sessions that leave you not with notes, but with a working system: configured tools, your own prompt library, and a clear count of the hours you got back.

  • Where: Zoom, link sent after payment
  • Group: up to 40 people, recordings stay forever
  • Price: $250
See the program and enroll