Analyze an Excel or CSV file with ChatGPT and check the numbers

Upload a structured spreadsheet, define the calculation, and reconcile row counts and totals before using ChatGPT’s answer.

A spreadsheet grid on a blue clipboard beside a calculator and blank receipt strips

Upload a structured Excel or CSV file to ChatGPT, ask it to identify the sheets and rows before calculating, then request one clearly defined result. Compare the row count and important totals with the original spreadsheet before using the answer. I'd start with a small, well-defined question, such as sales by region, because you can check both the calculation and the records behind it.

Prepare a copy you can reconcile

Keep the original workbook and make a separate copy for analysis. Upload only data you're allowed to share with the service and workspace you're using. Remove fields the question doesn't need; a regional sales total rarely requires customer names or contact details.

Give the copy descriptive column headers in its first row, with one record per row. OpenAI's spreadsheet preparation guidance advises against unrelated tables in one sheet, blank rows or columns that divide the data, and images containing the values to analyze. A clean table gives you a much clearer basis for checking the import.

Establish the meaning of a row before you count anything. An order export might contain one row per product within an order, so the number of rows can exceed the number of orders, as in Wharton's retail-data walkthrough. Keep the order ID and any line ID needed to distinguish those records. Removing repeated order IDs would discard valid items.

If your starting point is a PDF, check the relevant figures against the source document before moving them into a table. For exact calculations, a spreadsheet or text-based export is a better starting point than a picture of the table; OpenAI warns that scanned and visually complex tables may not yield reliable exact values.

Attach the file and inspect its contents

In ChatGPT on the web, select +, then Add photos & files, and choose the spreadsheet. This is the upload route shown in OpenAI's spreadsheet walkthrough. The available file tools depend on your model, plan and workspace settings.

ChatGPT attachment menu with Add photos & files highlighted above Agent mode
Choose Add photos & files to attach the spreadsheet. Select the image to enlarge the menu.

ChatGPT supports Excel and CSV files, but the general document upload ceiling isn't the spreadsheet allowance. The file upload limits put CSV files and spreadsheets at approximately 50 MB, depending on row size. A file within that limit can still be too complex for complete analysis.

Before asking for conclusions, use an inventory request like this. Replace the bracketed details with your file's names and the meaning of its records.

Inspect the attached file before doing any analysis.
List the available sheets or tables and their column names.
For each table, report the number of data rows, excluding headers.
Show a small sample from the beginning and end.
Report the interpreted data types and missing-value counts
for the columns relevant to [my question].

One row should represent [an order line / one customer / another unit].
Keep identifier columns as text where needed to preserve their values.
For [identifier column], report distinct values and missing IDs.
Don't remove duplicates, fill missing values, or change the data yet.
Tell me which parts you could not read completely.

Compare that inventory with the source file yourself. First and last rows can reveal a wrong sheet or incomplete range, but a preview alone doesn't prove that every row was included. Check the full record count and several identifiers from the middle of the source as well.

Read the interpreted types before accepting a summary. A postal code is an identifier even when it contains only digits; losing a leading zero changes its value. For dates such as 03/04/2026, state whether the source uses month/day or day/month. Specify the currency and whether amounts include tax when those distinctions affect the calculation.

Define one calculation before asking for insights

A useful analysis request names the input, the records to include and the calculation. “Find insights” leaves ChatGPT to choose those details. OpenAI's data analysis lesson recommends supplying column definitions and a timeframe, then asking for the approach as well as the answer.

For an educational example, suppose your workbook has an Orders sheet with Order_date, Region and Net_sales_USD columns. After checking the inventory, you could ask:

Use only the Orders sheet.
Sum Net_sales_USD by Region for [start date] through [end date],
including both dates, using Order_date.

Before calculating, state the filter and how you will handle
missing dates, blank regions, refunds, and nonnumeric amounts.
Ask me to resolve ambiguous cases instead of silently dropping them.

Return a table with Region, included row count, and total net sales.
Report the source row count, included count, and excluded count,
with reasons for exclusions. Keep blank-region records visible.
Include the overall total and show the calculation method.
If you use Python, show the code and its outputs.
Don't infer why sales changed from these totals alone.

Confirm the handling rules before continuing. For example, if your net-sales column already includes negative refund entries, explain that convention so the assistant doesn't subtract those refunds again. If the file holds multiple currencies, choose a conversion method and supply its rates before requesting a combined monetary total.

I prefer getting the calculation table before requesting a chart. You can inspect a table's records and totals directly; a plausible-looking chart can hide a wrong filter or an omitted group.

Check the result against the original

Recreate the same filter in your spreadsheet and independently calculate the overall total. A pivot table or your own sum can provide the comparison. Use the same source version and inclusion rules, or a difference between the two totals won't tell you which calculation is wrong.

  • Reconcile the rows: included records plus excluded records should account for the source records under the stated rules.
  • Add the group totals and compare the sum with the overall total for those same records.
  • Check a group back to its source rows, including refunds and blanks that could change the result.
  • For a rate or average, inspect its numerator and denominator as well as the displayed percentage.

For example, imagine two campaigns with 20 conversions from 100 visits and 30 conversions from 300 visits. Their rates are 20% and 10%, but the combined rate is 50 divided by 400, or 12.5%. Averaging the two percentages gives 15% because it gives the campaigns equal weight. This is a worked arithmetic example; choose the calculation that matches the question about your own data.

When ChatGPT runs Python, OpenAI recommends reviewing the generated code, outputs and assumptions. Look for the selected sheet and columns, the filter, and any operation that removes or combines rows. If you can't judge the code, ask for a plain-language explanation of those operations and check the totals independently. Another confident answer from the same chat doesn't establish that the first one was correct.

If you combine files, compare row counts before and after the join and ask for unmatched IDs. A customer table with several rows for the same customer can multiply order rows when joined. Resolve that relationship before accepting the resulting sales total.

If ChatGPT misses rows or stops early

Return to the inventory instead of repeating “analyze everything.” Ask ChatGPT to inspect the named sheet and report the exact range or table used. OpenAI explicitly notes that successful upload doesn't ensure complete analysis: file size, structure and formula complexity can affect processing.

If necessary, split a working copy into smaller files using a clear boundary, such as non-overlapping date ranges. Keep a record count for each part and reconcile their combined count with the source. State whether you need a combined result; separate summaries won't automatically use the correct denominator for an overall rate.

Ask for an exported table of the included records when the answer still doesn't reconcile. Compare its identifiers with the original to locate the missing or repeated rows. Keep the source unchanged while investigating the difference.

If the workbook contains formulas

Ask which inputs the analysis used: formula text, stored values, or a separate calculation. Uploading an Excel file doesn't establish that every formula was freshly recalculated using Excel's own engine.

There is a concrete distinction in file-reading tools. The openpyxl library can read a formula or its stored value, depending on its settings, and doesn't evaluate formulas itself. That behavior applies to openpyxl; it doesn't establish that ChatGPT uses that library for every upload.

For a calculation over final values, I'd prepare a separate values-only copy after checking the workbook in the spreadsheet application. Reconcile that copy with the original before uploading it. Preserve the original formulas so you can still trace the calculation later.

If you need to trace formula dependencies or edit the workbook itself, consider ChatGPT for Excel or Google Sheets. Those experiences work inside the spreadsheet and operate separately from the main ChatGPT chat history; conversations and spreadsheet data don't sync between them. Duplicate important files and review changed cells before saving or sharing.

Keep an output someone else can check

Once the numbers reconcile, ask for the final results table together with the filter and calculation notes. Keep those files alongside the source version. If you also request a chart, specify its axes and units, then compare its plotted values with the checked table before sharing it.

The Python analysis environment can't make external web requests or API calls. If your calculation needs exchange rates or another external dataset, supply that data or use an available connected source before calculating. Agree on the relevant date and definitions so the extra data answers the same question.

Finish by recording the decision the checked result supports and any question it leaves open. Keep a sales comparison separate from an explanation of its cause. For the next task, the everyday AI workflows hub provides other ways to work with your files and notes.