spreadsheet-kit 0.10.1

Core spreadsheet automation primitives — shared types, edit normalization, and session traits for agent-facing surfaces
Documentation

spreadsheet-kit

Crates.io License

Core shared primitives for the spreadsheet-kit workspace.

What's in this crate

  • CellEdit — canonical cell edit type (address + value + is_formula)
  • CoreWarning — structured warning type (code + message)
  • BasicDiffChange / BasicDiffResponse — diff result types
  • RecalculateOutcome — recalc result metadata (backend, duration, cells evaluated, errors)
  • Edit normalizationnormalize_shorthand_edit() parses "A1=100" / "B2==SUM(...)" into CellEdit
  • apply_edits_to_file() — applies a batch of CellEdits to an .xlsx file via umya-spreadsheet
  • SessionRuntime trait — scaffold for stateful session backends (open / apply_edits / recalculate / save_as)

What's intentionally not here

  • MCP server logic — see spreadsheet-mcp
  • CLI surface — see agent-spreadsheet
  • Region detection, caching, formula analysis — all in spreadsheet-mcp
  • Recalc backends — Formualizer and LibreOffice integration lives in spreadsheet-mcp behind feature flags

This crate is kept minimal so both the MCP server and the CLI can depend on it without pulling in server-specific dependencies.

Usage

[dependencies]
spreadsheet-kit = "0.1"
use spreadsheet_kit::write::normalize_shorthand_edit;

let edit = normalize_shorthand_edit("A1=42").unwrap();
assert_eq!(edit.address, "A1");
assert_eq!(edit.value, "42");
assert!(!edit.is_formula);

let formula = normalize_shorthand_edit("B2==SUM(A1:A2)").unwrap();
assert_eq!(formula.address, "B2");
assert_eq!(formula.value, "SUM(A1:A2)");
assert!(formula.is_formula);

Consumers

Crate Role
spreadsheet-mcp Stateful MCP server
agent-spreadsheet Stateless CLI

License

Apache-2.0 — see LICENSE.