Gridwell
Fast multi-format table rendering from a declarative IR
Gridwell is a Rust library that accepts a rich table Intermediate Representation (IR) and renders it to many output formats. It serves as a universal table rendering backend.
Key Features
- 11 output formats from a single declarative JSON input
- Language bindings for Python (PyO3), R (extendr), and C (FFI)
- Rigorous validation catches structural errors before rendering, and warns where a format can’t express a feature the table uses
- CLI tool for command-line conversions
- Conformance kit for checking a producer’s IR against expected tables
Supported Formats
| Format | Type | Description | Status |
|---|---|---|---|
| HTML | Text | HTML5 table | Stable |
| LaTeX | Text | tabular or longtable, with booktabs rules |
Stable |
| Typst | Text | Typst table markup | Stable |
| RTF | Text | Rich Text Format | Stable |
| SVG | Text | Standalone SVG image, with a measured layout | Experimental |
| ANSI | Text | Terminal output with box drawing and color | Experimental |
| Pandoc | Text | Pandoc JSON AST (a Table block) | Experimental |
| Quarto | Text | Quarto-flavored Pandoc JSON AST (a cross-referenceable Div) | Experimental |
| DOCX | Binary | Microsoft Word document | Stable |
| XLSX | Binary | Microsoft Excel workbook | Stable |
| PPTX | Binary | Microsoft PowerPoint slide | Stable |
An experimental format’s output is valid and has every cell, but its styling is best-effort and may change between releases: see Output Formats.
How It Works
┌─────────────────────────┐
│ Upstream Tool │
│ (gt / Great Tables) │
└───────────┬─────────────┘
│ IR (JSON)
▼
┌─────────────────────────┐
│ gridwell │
│ Parse → Validate │
│ → Render │
└───────────┬─────────────┘
│
┌───────┼───────┐
▼ ▼ ▼
HTML LaTeX DOCX ... (11 formats)
Quick Example
# Convert a table IR to HTML
gridwell convert table.json --to html
# Validate an IR file
gridwell validate table.json
# Pipe from stdin
cat table.json | gridwell convert --to latexGetting Started
Head to the Getting Started guide or browse the live demos to see gridwell in action.