How do I use ChatGPT to analyse an Excel or CSV file?
1 Answer
ChatGPT can analyse spreadsheets for you. You upload an Excel or CSV file, ask questions in plain language, and it calculates answers, creates charts and can even return a cleaned or modified file. Behind the scenes, it writes and runs code, usually Python, to process your data accurately.
Here is how to do it:
1. Click the attachment icon and upload your .xlsx or .csv file.
2. Ask it to first describe the data: "Look at this file and tell me what columns it has, how many rows and any problems you notice." This confirms it read the file correctly.
3. Then ask your real questions.
Examples of useful requests:
"Total sales by month and by product, as a table."
"Which five customers bought the most this year?"
"Create a bar chart of expenses by category."
"Find duplicate entries and rows with missing phone numbers."
"Compare this quarter with last quarter and explain the biggest changes."
"Clean the data: fix inconsistent city names, standardise dates and give me the corrected file to download."
"Calculate GST at 18 percent on the amount column and add a new column."
ChatGPT can also explain formulas and build them for you, which is useful if you want to repeat the analysis in Excel yourself.
To get better results, keep these tips in mind. Use clear column headers in your file. Remove merged cells, multiple tables on one sheet and decorative formatting, which can confuse the analysis. For workbooks with several sheets, tell ChatGPT which sheet to use. Ask for one thing at a time for complex analysis.
Always check the results. ChatGPT runs real calculations, but it can misunderstand what you mean, such as treating a column of IDs as numbers or using the wrong date format. Spot-check a few totals manually, and ask "Show me the method you used" to see exactly what it did. If the file is large, ask it to confirm the number of rows it processed.
Mind data privacy as well. Remove or mask customer names, phone numbers, account details and other sensitive data before uploading, unless your organisation has approved ChatGPT for that data, for example through a business plan.
For many people, this feature replaces hours of manual Excel work with a few minutes of conversation.