Key Takeaways
To analyze an Excel or CSV spreadsheet with ChatGPT, upload the file, define a specific question, and request a data check first. Then specify which rows belong in the calculation and how to handle duplicates or missing values. Check the resulting number on a few rows manually or with another tool before including it in a team report.
This guide helps you get a count, sum, or average from a small work spreadsheet. The example calculates support-ticket resolution time and shows how the row-selection rule affects the result.
Define one metric before analyzing the spreadsheet
“Analyze this file” leaves the tool to choose what to calculate. If you need a specific answer, phrase the question as a metric: “What is the average resolution time in minutes for resolved tickets in each category?”
Then clarify three things:
- Unit: minutes, hours, items, or another measure.
- Selection rule: which statuses, periods, or categories to include.
- Calculation rule: sum, average, count, or number of unique records.
“Number of rows” and “number of unique tickets” can differ. If a ticket appears more than once, first establish whether the repetition is an accidental duplicate or a record of different events.
Prepare the Excel or CSV file for reading
Give each column a clear heading. Put one record in each row, and do not insert an unrelated table in the middle of the first one. If an Excel file has several sheets, identify the sheet the tool should work on.
OpenAI’s data-analysis guide lists XLS, XLSX, and CSV among supported formats. For some tasks, ChatGPT also runs Python calculations; specific capabilities vary by account, model, and environment.
Start with a small file. According to OpenAI’s current upload instructions, CSV files and spreadsheets have an approximate 50 MB size limit, depending on row size. Additional upload limits depend on your account and settings.
Remove unnecessary personal data from work files and check that you have permission to upload the remaining information. Keep the original separately and work with a copy for analysis.
Check the data before starting the calculation
After uploading the file, use a prompt like this:
Inspect the data first. Do not calculate the average yet.
Tell me the column names and row count, excluding the header row.
Show the first five rows.
Identify exact duplicate rows, missing values, and negative or
non-numeric values in the minutes column.
Identify the ticket_id for each problem record.
Do not modify the original file or fill in data using assumptions.
If you cannot read part of the file, tell me exactly which part.
This step helps you choose the calculation rules. Treating an empty cell as zero can reduce the average; counting a repeated row twice can give one ticket extra weight.
If the same identifier has different values, do not ask the tool to arbitrarily delete one version. First check the source to understand what the difference means.
A practice CSV: eight rows and four eligible records
The data below is a fictional learning example. ticket_id identifies a ticket, category is its category, status is its status, and minutes is time in minutes. For the average, we need only the time for resolved tickets.
Save this text in a plain text file named tickets.csv and upload it for practice:
ticket_id,category,status,minutes
T01,login,resolved,12
T02,billing,resolved,18
T03,login,resolved,9
T04,billing,resolved,
T05,login,open,7
T06,billing,resolved,15
T06,billing,resolved,15
T07,login,resolved,-3
There are eight rows excluding the header. In this exercise, treat the two identical T06 rows as an accidental repetition and keep one. Seven unique tickets remain.
Choose these calculation rules:
- Count T06 only once.
- Include only records with
status=resolved. - Require
minutesto be numeric and nonnegative. - Do not fill missing values with zero or an estimated average.
Under these rules, T01, T02, T03, and T06 contribute to the average. T04 is missing a time, T05 is open, and T07’s negative time does not fit our definition.
Put the row-selection rule in the calculation prompt
The next task follows explicit rules:
In this practice file, treat exact duplicate rows as duplicates:
keep one row from each such group.
Do not apply this rule to matching ticket_id values with different
data; flag those cases separately.
Include in the average only records with status=resolved whose
minutes value is numeric and nonnegative.
Do not fill missing values.
Show:
1. Row counts before and after removing the duplicate.
2. Included ticket_id values and reasons for exclusions.
3. Each category’s count, total minutes, and average.
4. The overall average, including its numerator and denominator.
5. The calculation method and executed code, if you used code.
Keep the original file unchanged.
The correct check result for this example is:
| Category | Included tickets | Count | Total minutes | Average minutes |
|---|---|---|---|---|
| login | T01, T03 | 2 | 21 | 10.5 |
| billing | T02, T06 | 2 | 33 | 16.5 |
| Total | T01, T02, T03, T06 | 4 | 54 | 13.5 |
Check the overall average with (12 + 18 + 9 + 15) / 4 = 13.5 minutes. This result applies to four selected records. Of the seven unique tickets, six are resolved, but we excluded the times of two of those tickets from the calculation.
Include the limitation in your report: “The average is based on four resolved tickets; one resolved ticket has no time recorded, and another has an invalid time.” The data does not support presenting this as the average for all resolved tickets.
Verify the numbers with three independent checks
The first check is record count: eight initial rows, seven remaining records, and four tickets contributing to the average. If these counts differ, examine the selection rule first.
The second check is the sum: the categories’ 21 and 33 minutes should add up to 54. Adding a few source values manually is straightforward in this small example.
The third check is the denominator: divide 54 by four, because four time values entered the calculation. Dividing by six or seven puts records whose times were excluded into the denominator.
If the analysis uses code, read its rules and outputs. Recalculate an important answer using the same selection in Excel or another independent tool.
If your data is in a PDF table, the guide to reading PDFs and checking answers against the source can also help.
When to use a regular spreadsheet or another analysis tool
For the sum of two columns, an ordinary Excel calculation may be sufficient. ChatGPT is particularly useful when you need help defining selection rules, describing exceptions, or explaining a result clearly.
For a recurring report, save a formula or data-processing workflow you have checked once. Check columns, units, and exceptions again with each new file. The same heading does not always mean the same thing.
For a large dataset, many related tables, or regular reporting, a database and a dedicated analysis tool may be more appropriate. Choose based on data size, frequency of work, and verification needs.
Frequently asked questions about spreadsheet analysis with ChatGPT
Can I upload an image of a table?
Use an XLSX or CSV file when exact numbers matter. OpenAI notes limitations in reading image-based tables: their values cannot always be extracted reliably.
Should I replace an empty cell with zero?
First establish what the empty cell means. In this example it means an unknown time, so we do not fill it with zero. In a real file, that decision should follow the data definition.
Why might two answers give different averages?
Check whether both calculations use the same rows, units, and rules. Ask the tool to list the included identifiers and show the sum and count.
For your first exercise, use the eight-row file and check all four included tickets yourself. Then adapt this verification rule to your work spreadsheet.
Updated: October 10, 2026



