How to Feed a Spreadsheet to ChatGPT or Claude Without Garbled Numbers
June 29, 2026 · 5 min read
Excel and CSV data confuses AI when dates, merged cells, and totals get mangled. Here's how to turn a spreadsheet into context ChatGPT and Claude can actually reason over.
Paste a chunk of a spreadsheet into ChatGPT and ask for the Q3 total, and you will often get a confident, wrong number. The model is not bad at math; it is reading a mangled copy of your data. Dates arrive as five-digit codes, merged cells leave holes, and a total row gets averaged in with the line items. This is how to hand a spreadsheet to an AI so the numbers survive the trip.
Why spreadsheets break AI reasoning
A spreadsheet looks tidy on screen, but the text you copy out of it usually is not. The model then has to guess which numbers mean what, and guesses become hallucinated answers.
- Dates turn into serial numbers, so 2024-01-01 becomes 45292
- Merged cells copy as one value plus a row of blanks
- Multiple sheets flatten into one wall of tab-separated text
- Total and subtotal rows blend in with the data rows
- Currency and units ($, %, kg) get dropped, leaving bare numbers
- Empty columns and side notes sneak into the paste
Turn the grid into clean, labeled text
Models reason far better over a small, clearly labeled Markdown table than over raw tab soup. The goal is meaning, not the original layout:
- Keep one table per sheet, with a real header row.
- Convert Excel serial dates back into actual dates.
- Put a heading above each sheet or section so context is explicit.
- Remove the blank padding left by merged cells.
- Keep totals separate, or label them clearly as totals.
- Move units and currency into the column header, like Revenue (USD).
Don't paste 10,000 rows
Every model has a context window, and a giant sheet wastes it fast. If you only need a quarter's figures, send that slice. If you need a trend, summarize or aggregate first and give the model the rollup, not every transaction. Smaller, cleaner input is both cheaper and more accurate.
Before: Q3,45292,4200000,,Total — After: ## Q3 2024, Date: 2024-01-01, Revenue: $4.2M
Doing it automatically
PackForAI does this for XLSX (and PDF, DOCX, PPTX) in one step: it rebuilds real dates from Excel serials, gives each sheet its own labeled section, and returns a clean compact.md plus a token estimate so you can see exactly what you are sending. Upload a file, get back context an AI can actually trust.
Garbage in, garbage out is doubly true for spreadsheets. Fix the data, not the prompt.
Try PackForAI
Turn your PDFs, DOCX, PPTX, and XLSX into clean, AI-ready Markdown with token savings. Free to start.
Open the app