The SheetRS Suite is a high-performance toolkit for processing, linting, and manipulating spreadsheets (XLSX and ODS). Written in Rust, it is designed for speed, safety, and ease of integration into CI/CD pipelines.
The suite consists of three specialized CLI tools:
- sheetlint: Advanced spreadsheet linter with hierarchical rule enforcement.
- sheetstats: Detailed statistics and dependency analysis for workbooks.
- sheetcli: General-purpose spreadsheet operations (convert, modify, repair).
Requires Rust (latest stable).
# Clone the repository
git clone https://github.com/cosmoscalibur/sheetrs.git
cd sheetrs
# Install all tools
cargo install --path sheetlint
cargo install --path sheetstats
cargo install --path sheetcliA comprehensive linter for detecting errors, security issues, performance bottlenecks, and style violations.
Features:
- Hierarchical Reporting: Violations grouped by file → sheet → cell.
- Configurable: TOML-based configuration with global and per-sheet overrides.
- Formats: Support for JSON and text output.
Usage:
# Lint a file
sheetlint workbook.xlsx
# Lint with custom config
sheetlint workbook.xlsx --config sheetlint.toml
# CI/CD mode (JSON output) (:warning: experimental/unstable)
sheetlint workbook.xlsx --format json > report.jsonKey Rules:
ERR001: Error cells (#DIV/0!, etc.)SEC001: External workbook referencesPERF006: Excessive conditional formattingUX002: Inconsistent date formatsSM001: Excessive sheet counts
Provides deep insights into workbook structure, complexity, and dependencies.
Features:
- General Stats: Counts of sheets, cells, formulas, values.
- Dependencies: Builds a graph of inter-sheet dependencies (upcoming).
Usage:
# Get general stats
sheetstats workbook.xlsxA swiss-army knife for spreadsheet manipulation.
Features:
- Modification: Remove sheets, delete named ranges.
Usage:
# Remove sensitive sheets and save to new file
sheetcli input.xlsx --remove-sheets "Secrets" "Admin" --output cleaned.xlsx
# Remove named ranges
sheetcli input.xlsx --remove-ranges "OldRange" --output cleaned.xlsx- Error Propagation Tracing: Future versions may trace only the root cause error cell rather than reporting all affected cells.
- Python Bindings: PyO3 bindings for direct integration with Python data workflows.
- Windows & WASM: Windows support is likely functional but untested. WASM target for browser-based linting is planned.
- Performance Review: Continuous optimization for large workbooks (>1M cells).
See ARCHITECTURE.md for a detailed technical breakdown of the
sheetrs library and the CLI tool implementations.
MIT