My QUERY function doesn’t work after I opened the file in Excel
You built something with =QUERY(A2:F900, "select A, sum(D) where C='East' group by A") in Sheets. In Excel that cell is dead — #NAME?, or a frozen number that used to be right and no longer moves.
What’s actually breaking
QUERY runs a small SQL-like query language over a range — select, where, group by, order by, all in one string. Excel has no function that does that. Not a smaller version of it, not a rename — nothing. There’s no direct swap, so the fix is rebuilding the logic with whatever piece of Excel actually covers what your particular QUERY was doing:
- Simple select/where (pick some columns, filter some rows) — Excel 365’s
FILTER()spills a range the same wayQUERYdid, natively, no helper columns. - Aggregate / group by (sums, counts, averages per group) —
SUMIFS,COUNTIFS,AVERAGEIFScover almost all of it once you know which group-by column you’re keying on. - Real multi-condition, SQL-shaped stuff (joins, multiple aggregations, reshaping) — that’s Power Query’s job (Data → Get Data), not a single formula’s.
On export from Sheets, a broken QUERY cell almost always shows up wrapped in Google’s own placeholder rather than as a clean error — see __xludf.DUMMYFUNCTION / #NAME? after downloading a Google Sheet for what that wrapper contains and how to read the last real result back out of it.
How xlsx-for-ai handles it
xfa (the reader I use for this) reads a workbook and looks specifically for the ways a Sheets-only function survives into a file: a live QUERY(...) formula Excel can’t resolve, a cached #NAME?, or — the strongest case — the __xludf.DUMMYFUNCTION wrapper with QUERY’s last result cached inside it. All three of those, it flags: which cell, that it was a dead QUERY, and what value (if any) it can recover.
What it does not catch: a QUERY result that’s already been flattened to a plain number or table with no formula and no wrapper left behind. At that point there’s no signature in the file distinguishing it from data someone typed by hand, and xfa doesn’t pretend otherwise.
So the honest claim is narrow: it catches a dead QUERY that still carries a tell, and it says so plainly when a frozen result might have slipped through with none.
How to check your file
- Add the connector to Claude once — open Settings → Connectors → Add custom connector and paste
https://api.xlsx-for-ai.dev/mcp/claude. Full steps are on the developers page. - Read the live Sheet by id. In Claude, ask:
Reading a live Sheet is read-only and uses a read-only Google token you supply — see the developers page for the one-time setup.Read this Google Sheet and convert it to an .xlsx, with xfa. Flag anything that won't survive the conversion: https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit - Or skip the token — in Google Sheets choose File → Download → Microsoft Excel (.xlsx), then ask Claude to “read this file with xfa and tell me what it flagged.” Same reader, same flags.
- Read the flags. The result tells you exactly what it did and what it couldn’t carry across — so you review a short list instead of hunting for a wrong number later.
FILTER() handles the select/where half natively and spills like QUERY did — wrap it in SORT() if the original had an order by.More Google Sheets ↔ Excel problems
- ARRAYFORMULA stopped working in Excel
- A spilled range (FILTER, SORT, UNIQUE) broke in Excel
- Google-Sheets-only functions break in Excel
- __xludf.DUMMYFUNCTION / #NAME? after downloading a Google Sheet
- QUERY function not working in Excel
- IMPORTRANGE not working in Excel
- GOOGLEFINANCE not working in Excel
- A named function shows an error in Excel
- Numbers or dates look different after converting
- Notes and comments when converting to Excel
- Huge empty rows or columns in a Sheets export
- CSV columns are wrong (semicolons instead of commas)