Export a notebook
Three formats — PDF, HTML, and .ipynb — each for a different audience.
For: analysts and developers sharing notebook results.
QueryDeck exports notebooks in three formats. Pick based on who's going to read it and whether they need to re-run anything.
| Format | Best for | Re-runnable? |
|---|---|---|
| Reports for stakeholders, sharing externally | No | |
| HTML | Lightweight sharing, embedding in a wiki | No |
.ipynb | Importing into Jupyter, Hex, Deepnote, or other notebook tools | Yes (the SQL cells become Python with a SQL magic, or a comment, depending on importer) |
How to export
- Open the notebook.
File→Export Notebook...(or the export icon in the toolbar).- Pick a format.
- Choose options for that format.
- Pick a destination.
The export is fast — under a second for typical notebooks.
Best for sharing a polished, paged document.
What's included
- The notebook title.
- Every Markdown cell, rendered.
- Every SQL cell, with the query in a syntax-highlighted block.
- The cached result of each SQL cell, formatted as a table.
Options
| Option | Default | Notes |
|---|---|---|
| Page size | A4 | Or US Letter |
| Orientation | Portrait | Wide tables benefit from Landscape |
| Include SQL | On | Turn off to ship only the prose and results |
| Include row count | On | "Showing 10 of 142 rows" footers below each result |
| Theme | Light | Dark theme available for screen reading |
| Max rows per result | 50 | Cap on rows printed per cell to keep the PDF compact |
For long results, the cap means you'll see a "Showing X of Y rows" footer. To export everything, raise the cap or use the HTML export.
Use it when
- A stakeholder asked for "a PDF report".
- You're attaching the analysis to an email or a ticket.
- The audience won't open code-friendly formats.
HTML
Best for sharing on the web or pasting into a wiki.
What's included
Same as PDF: title, markdown, SQL, results. The HTML is self-contained — one file with inline CSS, no external dependencies.
Options
| Option | Default | Notes |
|---|---|---|
| Include SQL | On | Same as PDF |
| Theme | Auto (light/dark via prefers-color-scheme) | The reader's browser picks |
| Max rows per result | 100 | Higher than PDF since scrolling is fine |
| Embed images | On | Local images get inlined as base64 |
Use it when
- You're hosting the report on a wiki or internal site.
- You want a one-file artifact that opens in any browser.
- Tables are large enough that pagination would hurt readability.
.ipynb
Best for handing the notebook to someone who works in Jupyter, Hex, or Deepnote.
What's included
- Markdown cells become Markdown cells in the
.ipynb(1:1). - SQL cells become code cells. The exact format depends on what flavor of
.ipynbyou target:- Jupyter classic: SQL is wrapped in a comment block at the top of a code cell. The reader is expected to use a SQL extension (
jupysql,ipython-sql) to run it. .ipynbwith QueryDeck signature: Aqd-sqlmetadata block lets QueryDeck re-import the notebook later without losing fidelity.
- Jupyter classic: SQL is wrapped in a comment block at the top of a code cell. The reader is expected to use a SQL extension (
- Cached results are included as the cell output. This means the file shows the same numbers it showed in QueryDeck, even if the receiver doesn't run anything.
Options
| Option | Default | Notes |
|---|---|---|
| Flavor | QueryDeck-compatible | Use "Jupyter SQL magic" if the receiver expects %sql |
| Include cached results | On | Off if you want the receiver to run from scratch |
| Include connection metadata | On (anonymized) | The host is included as a comment, password is never written |
The receiver's tool will tell them how to run the SQL cells. We don't ship a kernel — that's by design.
Use it when
- A data scientist needs to extend the notebook with Python.
- You're handing off to someone whose primary tool is Jupyter or Hex.
- The project has a notebook-based pipeline and you want to feed in.
Copy as Markdown
For a quick paste into Slack, Linear, or a doc:
File → Copy as Markdown. The entire notebook is on the clipboard as plain markdown — SQL cells become fenced code blocks, results become markdown tables.
This is the fastest way to share a single notebook's contents without producing a file.
What's not yet supported
- Excel export. You can export individual result tabs to Excel (see Export data) but a whole notebook to Excel isn't a thing yet.
- Live HTML where the SQL re-runs in the browser. The exported HTML is a snapshot, not an interactive document.
- Per-cell export. Export is whole-notebook. To share one cell, copy its content manually.
Vote for any of these via the in-app feedback button.