Skip to main content
Tablix includes a built-in SQL editor that lets you query your spreadsheet data with real SQL — no external database required.

Opening the SQL Editor

Open the code editor sidebar and choose SQL as the language. Like the Python editor, it’s Monaco-based with syntax highlighting, a resizable console, dark mode, and an in-editor AI prompt box for generating queries from plain English.

How It Works

Your active sheet’s data is loaded into an in-memory SQLite database (via sql.js, SQLite compiled to WebAssembly) running in a background Web Worker — entirely in your browser.
  • The table is always named sheet
  • Column headers are auto-sanitized into valid sQL identifiers (spaces/special characters replaced, duplicate names de-duplicated, blank headers auto-named by column letter)
  • All columns are loaded as text; use SQLite’s date/string functions as needed for filtering and comparisons

Example

Running a query writes the result set back into the grid and also shows a preview table in the console.

AI-Generated SQL

Ask the AI Assistant (or the in-editor AI prompt) for what you want in plain English, and it generates a SQL query against the sheet table using your actual column names, then runs it.
The AI is instructed to always use GROUP BY/SUM (rather than picking a single row) when you ask for “highest”/“top” values by category.

External Databases

Beyond querying your local sheet, Tablix can connect to and pull tables in from external sources via the Database sidebar:
Once connected, saved connections appear under “Connected Sources” in the Database sidebar. Browse available tables/schemas and load a table into your sheet — after which you can query, chart, or run Python/AI analysis on it just like any other sheet data.
See Error Handling for SQL error messages and what causes them.