How do I clean up messy Excel data with AI?

Upload the messy file and ask for a clean sheet plus the summary you need. Irene drops blank lines and exact duplicates, turns text numbers into real numbers, flags a date it had to interpret, and builds the summary with formulas instead of typed numbers. The cleanup below took 2.5 minutes.

A real run: 12 messy lines to 8 clean rows

A run on sample files, 30 October 2026, on DeepSeek V4.1 Flash.

The sales export was a sample file. This was the request:

Clean this up into a proper sheet and give me units and revenue by region.

What the Spreadsheets agent did

  1. Read the file and counted what was there. Twelve data lines in; one blank line dropped; three exact duplicate rows removed, each a repeated rep-and-date pair; eight rows left.
  2. Fixed the types. A quoted "1,200" became the number 1200. The one 02/09/2026 was read as 2 September, the only reading that keeps the file in date order, and the choice was written on the Checks tab in case it was meant to be 9 February.
  3. Built the summary with formulas. Region units and revenue are SUMIF against the detail sheet, not typed numbers, so editing a row in Sales moves the summary.
  4. Checked its own work. Six checks came back TRUE: the clean row count, region units, region revenue, every region row reconciling at units × rate, and the rep list's units and revenue.
  5. Read the shape of the data and said what it could not judge. Revenue is exactly units × 100 in every row, so the revenue column adds nothing; it asked whether that was a placeholder rate. East is one order of 15 units, which is why it carries the least share despite the same revenue per unit.
  6. Added a live rep list as a follow-up. The list is formula-driven, not typed. It tested the formula by typing a sixth rep, saw her appear with her totals, then removed her. It also warned that new sales rows must go above the Total row so the SUM widens.
  7. Added the red flag as a second follow-up. The region table carries a live conditional format against the threshold cell, with the 1,700 in a real input cell; East (1,500) and West (1,600) light up, North and South stay black. It warned that 1,700 is close to every region and will flip on small changes.

What you get

The By Region sheet of the cleaned workbook: East 15 units and 1,500 revenue, North 21 and 2,100, South 18 and 1,800, West 16 and 1,600, total 70 and 7,000, with East and West flagged red; made by Irene

Four sheets in one workbook:

sheet what it holds
Sales the 8 clean rows, with real dates and numbers, a total row and a rep-number column
By Region units, revenue, revenue per unit, share of revenue, order count and the red flag
Reps a formula-driven list of reps with units, revenue, share and orders, plus unused slots
Checks the source counts and six TRUE tie checks

The Checks sheet: 12 source data lines, 1 blank line dropped, 3 exact duplicate rows removed, 8 clean rows, and six TRUE checks that the region and rep lists tie to the detail sheet; made by Irene

  • The region summary: East 1,500 · North 2,100 · South 1,800 · West 1,600 · total 7,000.
  • A date flag on the Checks tab for the one ambiguous date.
  • The honest caveat: revenue is units × 100 everywhere, so the revenue figure is not independent evidence of sales.

What it took

time steps tokens images
the cleanup 2.5 minutes 25 751,170 read (654,080 cached), 11,160 written none
the live rep list 5.0 minutes 35 2,102,563 read (2,055,168 cached), 24,731 written none
the red highlight 1.1 minutes 6 453,855 read (376,320 cached), 2,215 written none
the whole cleanup 8.6 minutes 66 3,307,588 read, 38,106 written none

It ran on your plan's usage, like any job; Plans, usage & shared usage has what each plan includes.

Why it used little model work: most of what the agent read came back from the cache, and the repeated workbook checks are formulas and code rather than fresh model reasoning.

How it's different

  • It cleans and proves it. The Checks tab records what went in and out — 12 lines, 1 blank, 3 duplicates, 8 clean rows — and six tie checks have to pass. A cleanup you cannot audit is a guess.
  • It reads the data's shape. Revenue being exactly units × 100, East being a single order, and 1,700 sitting close to every region are observations the file supports, not decoration; each one changed what the sheet says.
  • Real formulas, not typed numbers. The region summary is SUMIF, the rep list is built by formula, and the red flag is a conditional-format rule with the threshold in an input cell. Change a row or the threshold and the sheet follows.
  • It flags the ambiguous date instead of guessing silently. Day/month was chosen because it keeps the file in order, and the choice is visible on Checks.
  • It works on its own copy. A CSV upload opens read-only; your original is untouched.

How the grid, the formula engine and the built-in reflexes work: What can the Spreadsheets agent do, and how does it work?

Doing it yourself

  1. Open the agent switcher at the top of the sidebar and pick Specialists → Spreadsheets.
  2. Upload the messy file from Files.
  3. Ask for a clean sheet and the summary you need: "drop blanks and exact duplicates, make the numbers real, then give me units and revenue by region."
  4. Read the Checks tab. Answer the questions it puts to you, such as an ambiguous date or a placeholder rate.
  5. Ask for the extras: a live rep list, a red flag below a threshold, a formula summary.
  6. Download the workbook, or keep editing in the grid.

Limits

  • CSV files open read-only. The agent works on its copy; your original is untouched.
  • A date like 02/09/2026 is ambiguous. It picks the reading that keeps the file in date order and flags it on Checks; check it if the source is mixed.
  • Revenue per unit is constant here. At 100 in every row, it says nothing about performance; the page says so rather than reading it as a result.
  • A threshold close to every value will flip. 1,700 splits this data today, but small changes move regions across it.
  • New rows must go above the Total row so the SUM widens with the data.
  • The grid shows the first 5,000 rows and 256 columns. Bigger files still work on disk.

Questions

How do I clean up messy Excel data with AI? Upload the file and ask for a clean sheet plus the summary you need. Irene removes blanks and exact duplicates, fixes the types, builds the summary with formulas, and shows the counts and checks.

Does it remove duplicates? Yes. It removes exact duplicate rows and reports how many. In this run, three of twelve lines were duplicates and eight clean rows remained.

Will the numbers be real, or text? Real. A quoted "1,200" became the number 1200, dates are true dates, and the region totals are SUMIF formulas rather than typed values.

Can it flag rows or regions? Yes. The region table uses a live conditional format with the threshold in an input cell, so changing 1,700 to 2,000 re-colours the table without touching the formatting.

Does it change my original file? No. It works on its own copy; removing the upload deletes only Irene's copy, never your original.

Updated