formualizer-workbook
Ergonomic workbook API with sheets, evaluation, undo/redo, and file I/O.
formualizer-workbook is the recommended high-level interface for Formualizer. It wraps the calculation engine with workbook-friendly APIs for managing sheets, editing cells, evaluating formulas, tracking changes, and importing/exporting files.
When to use this crate
Use formualizer-workbook for most integrations:
- Set cell values and formulas, evaluate cells and ranges
- Load and save XLSX, CSV, and JSON workbooks
- Undo/redo with automatic action grouping
- Batch operations with transactional semantics
- This is the API that the Python and WASM bindings expose
Use formualizer-eval instead if you need direct engine access with custom resolvers.
Quick start
use LiteralValue;
use Workbook;
let mut wb = new;
wb.add_sheet?;
wb.set_value?;
wb.set_value?;
wb.set_formula?;
let result = wb.evaluate_cell?;
assert_eq!;
Features
- Mutable workbook model — add sheets, edit cells, and track staged formula changes without rebuilding the entire dependency graph.
- 320+ Excel functions — all built-ins from
formualizer-evalare available through the workbook surface. - Changelog + undo/redo — opt into change logging with automatic action grouping. Single edits are individually undoable; batch operations group as one step.
- I/O backends — pluggable readers/writers behind feature flags:
calamine— XLSX/ODS readingumya— XLSX reading/writing with round-trip supportjson— structured JSON serializationcsv— CSV/TSV import/export
- Batch transactions — atomic multi-cell operations with rollback.
- Evaluation planning — inspect the dependency schedule before computing.
License
Dual-licensed under MIT or Apache-2.0, at your option.