Google Sheets → Excel

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:

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

  1. 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.
  2. Read the live Sheet by id. In Claude, ask:
    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
    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.
  3. 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.
  4. 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.
Rebuilding tip: 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

← All Google Sheets ↔ Excel guides