Lesson 7 of 16 · Level 2: Intermediate
AI for Analyzing Documents, Spreadsheets and Images
- ⏱ 12 min read
- ❓ 4 review questions
- ✍️ Exercise with solution
In this lesson
- Analyze long documents by asking precise questions.
- Analyze spreadsheets with a method, and verify the results.
- Read images, screenshots and charts with AI.
- Research with web search while demanding sources.
- Work through a sales analysis from start to finish and know what result to expect.
Many AI assistants can read files (PDF, Word, Excel, CSV, images) and, in some cases, write and run code to analyze them. That puts analyses within anyone's reach that used to require programming skills or advanced Excel. In this lesson you'll learn to use these features with a method that produces correct results.
- Long documents
- Spreadsheets
- Images and screenshots
- Confidential data
- Web research
Analyzing long documents
Attach a contract, an annual report, a regulation or a manual and ask specific questions. Some high-value uses:
- Extract information: "From this contract, extract the parties, scope, term, price, payment terms, penalties and termination clauses, in a table."
- Compare documents: "Compare these two vendor proposals in a table: price, timelines, warranties, exclusions and risks."
- Find what matters: "What are the tenant's obligations? Give the clause number for each one."
- Q&A: "According to this procedures manual, what steps are required to approve a purchase over $5,000?"
When you analyze documents, ask the AI to give the page, section or clause behind each fact, or to quote the exact text. That way you can confirm in seconds that it didn't misread or invent anything.
A complete prompt for comparing two quotes, one of the most profitable uses in purchasing:
Attached are two quotes from uniform suppliers for my company in
Houston. Compare them in a table with these rows: unit price, total
price for 120 units, delivery time, required deposit, warranty,
shipping cost and size-exchange terms. For each value, give the page
you took it from. If a value isn't there, write "Not specified." At
the end, list 3 questions I should ask each supplier before deciding.
Expected result: a two-column table that's easy to review, with a few "Not specified" cells (that's normal: quotes often leave out shipping costs or exchange policies) and specific questions to fill those gaps. Notice that we didn't ask it to pick the supplier: that depends on priorities only you know.
1. You're analyzing a contract with AI. What reduces the risk of errors the most?
Specific questions plus citations let you check every answer against the original document.
Analyzing spreadsheet data
If your assistant can run code (it often shows up as "data analysis," "code interpreter" or something similar), it doesn't "read" the numbers in your Excel or CSV as text: it writes a small program, usually in Python, that does exact calculations. That's far more reliable.
A five-step method
- Step 1Prepare the dataOne row of clear headers, one row per record, no merged cells and no totals mixed in with the data. (The same rules as our lesson on data cleaning.)
- Step 2Ask for an exploration first"Describe this file: columns, data types, number of rows, the period it covers, and any blank or odd values."
- Step 3Ask specific business questions"Which 5 products brought in the most revenue last quarter, and how did they change from the previous quarter?"
- Step 4Ask for charts"Make a line chart of monthly sales by region."
- Step 5VerifyCheck one or two results with a pivot table or a manual calculation, and ask to see the code or method it used.
Questions that usually work well
• What trends and seasonality do you see in monthly sales?
• Which customers are buying less and less (possible churn)?
• Segment customers by purchase frequency and amount.
• Are there outliers or obvious errors in the data?
• Which variables seem related to returns?
(remember: correlation doesn't imply causation)
• Calculate the margin per product and sort from highest to lowest.
• Forecast sales for the next 3 months and state your assumptions.
Mistakes to watch for
Letting the AI guess what a column called "Total" means.
Explain each column: "Total includes sales tax; Price is per unit, before tax."
Assuming every date is MM/DD/YYYY: an export from an overseas supplier may use DD/MM/YYYY, so 03/04/2026 could be March 4 or April 3.
State the date format, ask how it was read and spot-check a couple of values.
Concluding that one thing causes another because they rise together.
Talk about a relationship, not a cause, unless you have an experiment or a proven explanation.
Presenting a forecast as if it were a fact.
Show it as an informed estimate, with its assumptions written down.
2. What kind of assistant should you use to analyze an Excel file full of numbers?
When the AI runs code, the program does the math, not the model, and you can inspect the code.
Worked example: a coffee roaster's sales
To practice the method on something you can check, use this test data (made up) from a small roaster selling in three cities. You can paste it straight into the chat:
Date,Product,City,Units,Price
2026-09-03,Coffee 12 oz,Portland,40,18
2026-09-05,Coffee 2 lb,Seattle,15,42
2026-09-10,Mug,Portland,12,15
2026-09-18,Coffee 12 oz,Boise,22,18
2026-09-24,Coffee 2 lb,Portland,12,42
2026-09-29,Mug,Seattle,8,15
This is September sales data (prices in dollars, before sales tax).
1. Calculate the revenue for each row (Units × Price).
2. Give me a table of revenue by city and another by product, with
each one's percentage of the total.
3. Tell me in one sentence which city and which product contribute
the most.
Show your calculation so I can check it.
Expected result: a total of $2,550. By product, the 2 lb bag ($1,134) and the 12 oz bag ($1,116) are almost tied, and mugs add up to $300. By city:
Portland brings in a little over half the revenue ($1,404 ÷ $2,550 = 55.1%). Check it yourself: if the AI gets a different total, ask how it read each column. And notice what it can't conclude from six rows: that Boise "isn't working" or that you should stop selling mugs. With so little data, any strong conclusion is an exaggeration, and a good answer should warn you about that.
3. Using the example data, what share of total revenue comes from Portland?
Portland adds up to $720 + $180 + $504 = $1,404 out of a $2,550 total: $1,404 ÷ $2,550 ≈ 55.1%.
Reading images, screenshots and charts
Today's models understand images. You can:
- Upload a photo of an invoice or receipt and have it extract the data into a table.
- Upload a screenshot of a chart and ask it to interpret it or spot which conclusion is misleading.
- Photograph a whiteboard after a meeting and turn it into a tidy document.
- Upload a screenshot of an error on your computer and ask how to fix it.
Always double-check numbers extracted from images, especially from blurry photos.
Getting formulas and code for your own files
If you don't want to (or can't, for confidentiality reasons) upload your data, describe its structure and ask for the tool instead:
I have an Excel file with 20,000 rows: Date, Store, Product,
Quantity, Price. I want a monthly summary by store with total sales
and growth versus the previous month. Explain how to do it with a
pivot table, step by step. Alternatively, write a Python script
with pandas that reads "sales.xlsx" and creates "summary.xlsx".
That way your data never leaves your computer. To understand and adapt what it gives you, see our lessons on pivot tables and Python for data analysis with pandas.
Research with web search
Assistants with web search (and "deep research" features that consult dozens of sources) are useful for market, competitor or regulatory analysis. Treat them as a starting point:
- Always ask for sources with links, and favor primary sources (government agencies such as the Census Bureau or BLS, studies, the company's own documents).
- Check the date of every figure.
- At a minimum, open the sources for any data you'll use to make a decision.
4. You're researching a topic with web search. What should you insist on?
Sources let you verify, and dates tell you whether the information is still current.
Before you present an analysis made with AI
Practice exercise
Create a small test table in Excel or Google Sheets (no confidential data) with 30 rows: Date, Product (4 products), Region (3 regions), Units and Price. Then:
- Upload it to an assistant that can analyze files and ask for an initial exploration.
- Ask for sales by product and region, plus a chart.
- Check the result with a pivot table in your sheet.
- Ask for three business conclusions and judge whether they make sense.
See solution
Check three things: that the totals match your pivot table, that no row was lost (ask how many rows it read: it should say 30) and that the conclusions come from the data rather than general assumptions. If something doesn't add up, ask how it did the calculation: the problem is often how it interpreted a column, such as treating Price as a total instead of a unit price.
On the conclusions, be strict: with 30 rows, "Product B sells more in the West" is a fair observation, but "we should drop Product D" is not; a good answer adds that caveat on its own.
Summary
- For documents, ask specific questions and require page or clause citations.
- For data, use assistants that run code and follow the method: prepare, explore, ask, chart, verify.
- Spell out what each column means and which date format you use.
- If the data is confidential, ask for the formula or script and run it yourself.
- For web research, demand sources and check the dates.
Next lesson: How to Build a Custom AI Assistant: Instructions, Knowledge Files and Testing. You'll write professional instructions, prepare knowledge documents, test with trick questions, then share and maintain your assistant.
Create your account in 30 seconds, mark your lessons and download your certificate at the end.