Exporting Data as a Self-Contained HTML Table
Sometimes you need to share data with someone who does not have Excel, cannot open a CSV reliably, and will not install anything new. The HTML export in ExploreMyData produces a single .html file that opens in any browser on any operating system.
What the output looks like
The exported file contains a complete HTML document with the CSS inlined in a single
<style> block. No external
stylesheets, no JavaScript, no CDN links, no fonts to fetch. One file, nothing else.
Concretely, what you get is:
- An
<h1>with the file name, extension dropped - A small grey meta line under it reading, for example, "1,204 rows, 6 columns"
- A full-width table with a solid green header bar and white header text
- A thin light rule under every row
- A hover highlight: the row under your cursor gets a subtly lighter background
- Dark mode via
prefers-color-scheme, so the page follows the viewer's system setting with no toggle needed
It is worth being clear about what is not in there, because a styled table invites assumptions. There are no alternating row stripes. The header does not stick when you scroll. Numbers are left-aligned like everything else, since the exporter renders every value as text and doesn't try to detect numeric columns. And there is no timestamp anywhere in the file: if you need to know when a snapshot was taken, put it in the file name.
The table is also plain width: 100%
rather than wrapped in a scroll container, so a very wide table on a narrow phone will squeeze the
columns rather than scroll them. For twenty-column exports, assume a desktop reader.
Here is a simplified example of what the rendered output looks like:
| product | category | revenue | units |
|---|---|---|---|
| Widget A | Hardware | 12400 | 310 |
| Widget B | Hardware | 8750 | 215 |
| Service Plan | Software | 23100 | 462 |
| Connector Kit | Accessories | 3200 | 640 |
Everything left-aligned, and the numbers rendered exactly as DuckDB prints them: no thousands
separators are added. If you want 12,400
rather than 12400, format the
column before you export, for instance with a Convert Type step to text or a SQL Query step using
format().
Special characters are escaped on the way out, so a value containing
<script> shows up as text
rather than running. Opening an exported file from an untrusted dataset is safe.
When to use HTML export
HTML is the right export format in a few specific situations:
- Sharing with non-technical stakeholders. Attach the file to an email or Slack message. The recipient double-clicks it and sees a formatted table. No software needed beyond a web browser.
- Embedding in internal wikis or documentation. Many wikis (Confluence, Notion, internal tools) accept HTML embeds or allow you to paste HTML source. The self-contained nature of the export makes this straightforward.
- Quick visual previews of query results. If you ran a complex pipeline and want to snapshot the output for later reference, HTML preserves the formatting better than a raw CSV.
- Archiving data snapshots. HTML files are stable over time. They don't depend on a specific application version or online service. A file exported today will render identically in a browser ten years from now.
How to export
- Load your file (CSV, JSON, Parquet, Excel, XML, and the rest).
- Apply any transformations: filter rows, rename columns, group and aggregate.
- Click Export.
- Select HTML from the eight format options.
- The file downloads immediately.
The export includes every row your pipeline produced, not just the page you can see in the grid. If you filtered from 10,000 rows down to 200, exactly those 200 appear in the HTML file.
There is a ceiling: 500,000 rows. Past that the export takes the first 500,000 and the meta line says so, reading something like "500000 rows (capped from 1200000), 6 columns". That cap is deliberate. Half a million table rows already produces a file in the tens of megabytes that will make a browser struggle to render it, and HTML is the wrong container for that much data anyway. Export Parquet or CSV instead and let the recipient's tools do the work.
Compared to other export formats
| Format | Best for | Limitations |
|---|---|---|
| CSV | Programmatic consumption, database import | No formatting, encoding issues in Excel |
| JSON Lines | Log pipelines, streaming loaders, warehouse ingest | Not a bracketed JSON array; not human-readable at scale |
| Excel | Recipients who need formulas or further editing | Requires Excel or compatible software |
| Print-ready documents, formal reports | Static, hard to extract data from | |
| HTML | Browser-readable sharing, zero-setup viewing | Not ideal for programmatic processing |
HTML fills a gap between raw data formats (CSV, JSON) and presentation formats (PDF). It preserves visual structure without requiring any software beyond a browser.