Google Sheets to Excel: see what breaks, and repair it.
Download a Google Sheet as .xlsx and part of it stops working — quietly. Formulas that only exist in Sheets arrive dead, and nothing tells you. xlsx-for-ai makes that loss visible, and repairs the classes that can be repaired.
QUERY work in Excel.” What has no good fix out there, and what we do, is surface exactly what died on the way over — instead of shipping a workbook that looks fine and is silently wrong.What silently breaks on export
When a Google Sheet is exported to .xlsx, functions unique to Sheets have no Excel counterpart. They don’t error loudly — they arrive as dead formula text or a #NAME?, often carrying a last-computed value that now never updates. The usual casualties:
QUERY— the SQL-like Sheets function; no Excel equivalent.ARRAYFORMULA— Sheets’ array-wrapper idiom.IMPORTRANGE— a live cross-spreadsheet link that cannot survive the file boundary.GOOGLEFINANCE— a live market-data feed with no offline counterpart.
Two structural problems come across too: an oversized used-range (a sheet that reports millions of empty cells and bloats the file), and repeated formulas left un-compacted (the same formula written row-by-row instead of as one Excel shared formula).
Step 1 — see what died: xlsx_healer_diagnose
Diagnose produces a structured report of the repairable damage in a workbook, keyed to the repairs below. It reports two families: broken or at-risk external references, and Google-Sheets-to-Excel export damage — the dead Sheets-only formulas (surfaced as an unverified value to double-check), the oversized used-range, and the un-compacted formulas. Every finding is reported, never altered in place.
Diagnose what broke when this Google Sheet was exported to sales-export.xlsx, with xfa.
Step 2 — repair the fixable classes: xlsx_healer_cure
Cure applies one specific, named repair to a diagnosed workbook. For the Google-Sheets export damage there are three:
1. Flag the dead formulas — sheets_annotate_dead_formula
Marks each dead Sheets-only formula with an in-cell note so the loss is visible to whoever opens the file. It does not recompute the function — a Sheets-only function has no Excel equivalent to compute. The point is honesty: the value is called out as unverified rather than passing as real.
2. Trim the bloat — sheets_trim_dimension_bloat
Shrinks an oversized used-range back to the region that actually holds data, so the workbook opens fast and reports its true dimensions.
3. Compact repeated formulas — sheets_compact_shared_formulas
Collapses the same formula repeated down a column into Excel’s shared-formula form — smaller file, identical results.
Annotate the dead Google-Sheets formulas in sales-export.xlsx so the losses are visible, with xfa.
Skip the export: read the live Google Sheet
Often the cleanest fix is not to fight the exported file at all. Point xlsx_read at a Google Sheet by id and get the same rendered output as reading the equivalent .xlsx — the same engine, byte-identical. Read-only, with a read-only Google token you supply; no credential brokering. One-time setup is on the developers page.
Read this Google Sheet and describe its columns, with xfa:
https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit
Converting an already-exported file
xlsx_convert reads a file exported or downloaded from Google Sheets and converts it between formats. It is deterministic and structural — no LLM guessing. Exact formula and structure preservation holds on the own-engine path only, so the response reports served_engine: if it reads "incumbent", a compatibility-engine fallback handled the file and may not preserve charts, pivots, or other advanced features. The caveat is surfaced, not hidden.
The reverse direction (Excel → Google Sheets)
Going the other way has its own defect classes, and we catalogue and diagnose them — but today that direction is reported, not auto-repaired. We describe exactly what we deliver: a cure exists for the Google-Sheets-to-Excel export damage above; the reverse is diagnosis only. We’d rather say that plainly than imply a repair we don’t ship.
Using it
These are MCP tools — they work in Claude Code, Cursor, Gemini, ChatGPT and any MCP-compatible host, and from the xfa CLI. Add the connector once (Settings → Connectors → Add custom connector, paste https://api.xlsx-for-ai.dev/mcp/claude) — full steps on the developers page. Then diagnose and cure from the CLI:
xfa heal <path> [--mode as_copy|in_place] [--out <path>] [--format text|json]
See the full tool surface on the home page.
What we don’t claim
- We don’t compute Google-Sheets-only functions inside Excel — nothing can. We make their loss visible.
- We don’t position against Microsoft or Google. The goal is simply to make your file work.
- Where we only diagnose and don’t yet repair (the reverse direction), we say so.
Symptom-by-symptom guides
For a specific error, the Google Sheets ↔ Excel guide hub walks each one: