Skip to content

Sheets add-on features

SQL Cell is a SQL editor that lives in a Google Sheets sidebar and writes its results into the sheet. Everything below happens in your browser.

Run SQL against files, without importing them

The query engine is DuckDB, compiled to WebAssembly and running in the page. Attach a file and it is queryable immediately — there is no import step, no row limit imposed by a paste, and no copy of your data on anyone’s server.

Supported formats: CSV, TSV, Parquet, JSON, JSONL / NDJSON and XLSX. Files are referenced by name in single quotes:

SELECT * FROM 'sales.csv' WHERE region = 'EMEA';

Attached files last for as long as the sidebar is open. See Getting started for what that means in practice.

Read remote files over HTTP

A URL works anywhere a filename does:

SELECT * FROM 'https://example.com/data/events.parquet';

For Parquet, DuckDB reads the file’s footer first and then fetches only the row groups your query actually needs — so a filtered query against a large remote file transfers a fraction of it.

This depends on the host supporting HTTP range requests and exposing the Content-Range header to browser JavaScript. Many do not. When the header is unreadable, DuckDB falls back to downloading the whole file before querying it. It still works; it is just slower than it looks like it should be.

Preview results before they reach the sheet

Running a query writes nothing. You get a preview first:

  • Columns — each column’s type, the distribution of its values, its range or distinct count, and the share that are null.
  • Rows — the first 100 rows.
  • The destination range, which you can change by clicking a different cell in the sheet while the preview is open.

Then Insert, or Discard. If the target cells already hold something, SQL Cell asks before overwriting.

Keep the query with the workbook

Each inserted result becomes a named range (SQL_Cell, SQL_Cell_1, …), and its header cell holds a formula that carries the query:

=LAMBDA(SQL_Cell,"region")("SELECT region, sum(total) FROM 'sales.csv' GROUP BY region;")

The formula evaluates to the header text, so the sheet reads normally. But the query is stored in the spreadsheet rather than in an account somewhere, which means it survives being shared, copied or downloaded — and it is what the History panel reads to rebuild your query list.

What it does not do

Worth being straight about:

  • It is not a scheduled pipeline. Queries run when you press Run. Nothing refreshes on a timer, and results do not update when the source file changes.
  • It does not connect to hosted databases. There are no credentials to enter and no connection strings. Data comes from files — local or over HTTP.
  • It does not read your other sheets as tables. Queries read attached files and URLs; results are written back to the sheet. Querying the spreadsheet itself is not supported today.
  • Attached files are not stored. Closing the sidebar detaches them, by design.