How it works
formulaDB puts a real SQL engine inside Excel. When you type =DB.QUERY(...), the query runs in DuckDB, compiled to WebAssembly and running inside the browser sandbox the add-in lives in. The result spills back into the grid like any other dynamic array.
Nothing round-trips through a formulaDB server. The browser reads the data — a remote file or a local one — runs the SQL locally, and returns the rows. There is no account, no upload step, and no backend that sees your data.
The query path
Section titled “The query path”- A cell calls
=DB.QUERY(sql, ...sources). - DuckDB reads each source the query names.
- It runs your SQL over those sources.
- The result spills into the sheet, with the column names as the first row.
Because the query lives in the workbook, it refreshes with Excel’s normal recalculation. The query is the document — when an input changes, the answer updates.
Source cells
Section titled “Source cells”You don’t pass a URL straight into =DB.QUERY. First you name the source with =DB.SOURCE, which binds the source to a short SQL alias and returns a source cell:
A1: =DB.SOURCE("https://formuladb.sumpalabs.com/samples/sales.parquet", "sales")B1: =DB.QUERY("SELECT region_id, SUM(revenue) FROM sales GROUP BY region_id", A1)The query refers to the source by its alias (sales), and passes the source cell (A1) as an argument. This is deliberate: Excel’s recalc graph now knows that B1 depends on A1, so changing the source re-runs the query. It also lets one query reference several sources — pass one source cell per source and JOIN them by alias.
Remote or local
Section titled “Remote or local”A source is either remote or local, and formulaDB tells them apart by whether the name is a URL:
- Remote — an
https://address. The browser fetches the file directly from wherever it’s hosted. - Local — a file you choose with the task pane’s file picker. It’s read in the browser and never leaves your machine; you refer to it by its file name.
Either kind binds to an alias the same way, so a query can JOIN a remote dataset against a local file without either one being copied anywhere.
Reopening a workbook
Section titled “Reopening a workbook”Local files live only for the current session. formulaDB holds on to each file you pick for that session alone and keeps no copy of it, so a workbook you close and reopen comes back without its local files.
A reopened workbook shows the values from your last save. Excel doesn’t re-run formulaDB’s formulas when it opens a file; it shows what each cell held when you saved. Your source cells and query results look exactly as you left them, but none of their local files has been reconnected yet. Nothing in the grid tells you so: #VALUE! errors appear only as you edit or recalculate, one cell at a time.
Open the task pane and, after Get Started, the Files card lists the local files that need reconnecting, with a Reconnect button.
Reconnect
Section titled “Reconnect”Click Reconnect and pick the folder that holds your sources. formulaDB matches the files in that folder — subfolders included — to the missing ones by file name, then recalculates the source cells that use them, and with them every query that depends on those cells. The task pane reports how many came back and names any it couldn’t find in that folder.
- Two files with the same name are never guessed between. If the folder holds both
2023/sales.csvand2024/sales.csv, formulaDB names both and restores neither, rather than risk loading the wrong year. Pick a narrower folder. - Other supported files in the folder are added too, ready to use. Nothing reads them until a query does.
- Your browser asks you to confirm the folder before handing it over. Whatever its dialog says, the files are read in place and never leave your machine.
Keep your sources in one folder. Reconnect restores every missing file it finds in the folder you pick, so when a workbook’s local files sit together, one pick brings them all back. Sources spread across several folders mean one Reconnect per folder.
Why it still takes a dialog
Section titled “Why it still takes a dialog”You might expect formulaDB to remember where each file lives and open it again, the way Excel’s own Power Query does. An add-in can’t. The browser sandbox it runs in only ever tells it a file’s name, never its path, and Office.js gives add-ins no access to your file system. There is no path to remember, so every reconnect goes through a file dialog. What Reconnect saves you is the repetition: one dialog for every missing file, not one dialog per file.
What needs no reconnecting
Section titled “What needs no reconnecting”Only local file sources are tied to the session. A remote source is fetched from its https:// address, and a range source reads cells saved in the workbook itself, so both work as soon as the workbook opens.
Reconnect is also different from a re-pick, which brings in a new version of a file you edited while the workbook is open. To re-pick an edited file, un-mount it in the Files card, add it again with Add files, and refresh Cached queries; the queries that use it read the new contents the next time they recalculate.
Partitioned datasets
Section titled “Partitioned datasets”Large datasets are usually split into many files — for example one file per year. Plain HTTP has no way to list the files in a folder, so formulaDB uses a small manifest: a JSON document that lives next to the dataset and lists its files. You point =DB.SOURCE at the manifest’s URL (a .json), and formulaDB reads the manifest first, then the files it names.
These datasets are often partitioned — the folder names encode a value, like year=2024. formulaDB exposes those partition keys as ordinary columns you can query and filter on. When your filter is on a partition column, whole files are skipped before anything is downloaded, so a query for one year doesn’t pull the others.
The first-party demo for this is PetroDB, a public corpus of oil-and-gas datasets — a year-partitioned production dataset is the canonical example of the manifest-plus-partitioning path.
Limits worth knowing
Section titled “Limits worth knowing”- Every query has a 60-second timeout and a 1,000,000-row result cap — see
=DB.QUERYfor what happens when you hit them. - Local files don’t survive closing the workbook — see Reopening a workbook.
- Install — get the add-in into Excel.
- Examples — worked queries, from one file to a multi-source JOIN.
=DB.QUERY·=DB.SOURCE·=DB.SCHEMA— the full function reference.