
gridcraft
Open Source Spreadsheet in Pure Rust
Excel-Compatible Spreadsheets with XLSX, CSV, ODS, Charts, PivotTables & 500+ Functions.
What is gridcraft?
GridCraft is an open-source, clean-room reimplementation of Microsoft Excel built entirely in pure Rust. It delivers a familiar Excel-like interface with full support for XLSX, CSV, ODS, and more, while running natively on macOS, Windows, Linux, BSD, and the web via WebAssembly. Designed for performance and extensibility, GridCraft features a dependency-graph calculation engine, dynamic arrays, 500+ worksheet functions, structured table references, conditional formatting, charts, PivotTables, and more. Its agent-native architecture exposes every UI action as a JSON command over MCP, CLI, or control channel, making it ideal for automation and integration.
GridCraft prioritizes compatibility and speed: it supports Excel's full number-format language, sort and AutoFilter, Flash Fill, data validation, outlining, and print settings—including XLSX round-tripping for styles, themes, formulas, tables, comments, hyperlinks, and charts. With copy-on-write workbooks for free undo snapshots, incremental recalculation, and a virtualized grid that only renders visible cells, GridCraft delivers responsive performance even with large datasets. As part of the ArtCraft suite, it remains free, open-source, and telemetry-free, with no subscriptions or license servers required.
Getting Started with gridcraft
GridCraft is distributed as a Rust crate and desktop/web application. Install via Cargo for CLI and library use, or download prebuilt binaries for macOS, Windows, Linux, and FreeBSD. For developers, the source is available on gridcraft GitHub. To build from source, ensure Rust and Cargo are installed, then run cargo run --release -p gridcraft to launch the desktop app. For web builds, use trunk build --release in the apps/gridcraft-web directory. The CLI tool (gridcraft-cli) supports evaluation, command execution, and MCP server mode for automation.
Install gridcraft via Cargo
cargo install gridcraft-cli
cargo run --release -p gridcraftExcel-Compatible File Formats
GridCraft provides deep XLSX support, including styles, themes, formulas (including dynamic arrays), tables, conditional formats, validation, comments, hyperlinks, charts, pictures, sparklines, PivotTables, and print settings—round-tripping reliably. It natively reads and writes CSV and TSV, imports ODS and XLSB data (using saved values instead of formulas), and exports to PDF with print area and page break preview. The engine preserves Excel's number-format language, structured table references, and formula syntax, ensuring compatibility with complex workbooks. Whether you're opening legacy files or sharing with Excel users, GridCraft maintains fidelity across formats while offering a modern, responsive interface.
How to Open and Save an XLSX File via CLI?
# Open an existing workbook
gridcraft-cli run --book report.xlsx --cmd 'home.bold={"range":"A1:C1"}'
# Save with formatting preserved
gridcraft-cli run --book report.xlsx --out formatted_report.xlsx500+ Functions & Dynamic Arrays
GridCraft includes over 500 Excel-compatible worksheet functions, including dynamic array helpers like FILTER, SORT, UNIQUE, SEQUENCE, and LAMBDA. It supports structured table references, LET, MAP, REDUCE, SCAN, BYROW, BYCOL, and MAKEARRAY for advanced calculations. The dependency-graph engine ensures fast, incremental recalculation, and spilling behavior matches Excel's. Whether you're building financial models, data analysis dashboards, or gradebooks, GridCraft handles complex formulas with precision. Its formula bar, Name Box, and point-mode entry with colored references provide an intuitive experience for both beginners and power users.
How to Use Dynamic Arrays and LAMBDA Functions?
# Evaluate a dynamic array formula
gridcraft-cli eval '=UNIQUE(FILTER(A2:B100, B2:B100>1000))'
# Define and use a custom LAMBDA
gridcraft-cli eval '=MAP(A2:A10, LAMBDA(x, x*2))'Charts, PivotTables & Visualization
GridCraft supports 17 chart types—including clustered column, line, pie, bar, scatter, and combo charts—with full formatting via the Chart Design tab and Format pane. PivotTables offer field lists, filters, layouts, date grouping, and show-values-as options, with data imported from XLSX preserved. Sparklines, conditional formatting (including color scales, data bars, and icon sets), and cell pictures (embedded and sized to fit) enhance data storytelling. The virtualized grid ensures smooth interaction even with large datasets, and print preview with page breaks, headers, and margins streamlines PDF export. These features make GridCraft suitable for professional reporting and data analysis.
How to Insert a Chart and PivotTable via CLI?
# Insert a clustered column chart
gridcraft-cli run --book data.xlsx --cmd 'insert.chart={"chartType":"columnClustered","range":"A1:D10"}'
# Create a PivotTable
gridcraft-cli run --book sales.xlsx --cmd 'insert.pivotTable={"sourceRange":"Sheet1!A1:D100","destinationRange":"Sheet2!A1"}'Agent-Native Automation & MCP
GridCraft is designed for agents and automation: every ribbon button, menu item, dialog, keystroke, and mouse gesture is exposed as a command over a JSON control channel, MCP server, or CLI. The MCP tools include read_range, write_range, set_cell, evaluate_formula, format_range, insert_chart, create_table, sort_range, filter, and execute_command. This enables seamless integration with AI assistants, CI/CD pipelines, and custom tools. With headless MCP server mode and real-time pointer/keyboard input, GridCraft bridges the gap between visual interfaces and programmatic workflows—ideal for developers building spreadsheet-based applications or automating data tasks.
How to Use MCP for Range Operations?
# Start MCP server
gridcraft-cli mcp --connect 7979
# Evaluate a formula via MCP
gridcraft-cli eval '=XLOOKUP("b",{"a","b"},{1,2})' # → 2
# Read a range as aligned text
gridcraft-cli cat report.xlsx --range B4:F15