Clean messy spreadsheet data.
Inconsistent dates, stray whitespace, numbers stored as text, duplicate rows — cleaned in your Excel (.xlsx) and CSV files, right where your AI agent already works. It proposes every fix; you approve. Runs locally. Free.
What "messy data" usually means
Real spreadsheets accumulate grime that quietly breaks formulas, charts, and downstream analysis. xlsx-for-ai detects and proposes fixes for the common cases:
- Inconsistent dates —
3/4/2026,2026-03-04, andMar 4mixed in one column. - Stray whitespace — leading, trailing, or doubled spaces that make
"Acme "and"Acme"look different to a formula. - Numbers stored as text — values that look numeric but won't sum or chart because they're really strings.
- Duplicate rows — exact or case-insensitive repeats, optionally compared on just the columns you choose.
- Constant columns — a column where every cell holds the same value, flagged so you can decide whether to drop it.
- Categorical variants —
"USA","U.S.A.", and"United States"that mean the same thing. - Imputable gaps — missing values in a measurement column it can propose filling (by mean, median, mode, or a fixed value — only when you ask).
You approve every change
The cleaner proposes fixes — it never silently overwrites your data. By default it runs in diagnose mode: it tells you what it found and what it would change, and nothing is touched until you say so. When you do apply fixes, it writes to a copy and reports exactly what changed, cell by cell.
It never fabricates identity data. Columns that look like names, emails, IDs, or other identifying values are flagged, never auto-filled or invented — imputation is reserved for measurement columns, and only when you opt in. The ledger it returns is honest about what it did and didn't touch; it makes no "100% clean" or "ready for ML" claims.
Runs locally, for your AI agent
This isn't a website you paste a file into. xlsx-for-ai installs as a command-line tool and an MCP server, so the AI agent you already use — Claude, Cursor, and other MCP-aware agents — can clean a workbook on your own machine. No upload, no API key, no signup. It's free.
Excel and CSV, both directions
The same cleaning works on Excel (.xlsx) and CSV files. And if you have a CSV you'd rather hand off as a real spreadsheet, xlsx-for-ai can convert it to .xlsx on the way out — so a cleaned CSV becomes a tidy workbook in one step.
Get it
Install the client and register it with your agent — two commands:
npm install -g xlsx-for-ai
claude mcp add xfa -- xlsx-for-ai-mcp
Then ask your agent in plain English — copy this prompt to try it:
"Clean up reporting-pack-v1.xlsx — fix inconsistent dates, stray whitespace, and numbers stored as text — and tell me what you changed, with xfa."
It'll show you what it found first. You decide what to apply.
Full docs and the complete tool reference are on the GitHub repository and the npm package page.