Skip to main content

Compile Excel workbooks into semantic blocks and machine-readable artifacts

Project description

spreadsheet-engine

Open-source Spreadsheet Understanding Engine (spreadsheet_engine). Compiles Excel workbooks into semantic blocks, compressed formulas, UI render models, and retrieval chunks—without dumping raw cell grids.

Install from PyPI:

pip install spreadsheet-engine
# optional LLM block enrichment
pip install "spreadsheet-engine[llm]"

Or from git:

pip install "spreadsheet-engine @ git+https://github.com/your-org/spreadsheet-engine.git"

Quick start

cd spreadsheet-engine
uv sync --extra dev

# Compile workbook → ./out
uv run spreadsheet-engine compile input_1.xlsx --out ./out

# Compile multiple workbooks into one merged artifact set
uv run spreadsheet-engine compile input_1.xlsx input_2.xlsx --out ./out

# Single sheet
uv run spreadsheet-engine compile input_1.xlsx --sheet Dashboard --out ./out

Artifact outputs (public contract)

These files are consumed by downstream tools (e.g. spreadsheet-agent):

File Purpose
artifact.json Semantic IR (blocks, tables, timelines)
artifact_ui.json UI positioning + sparse cell runs
artifact_retrieval.jsonl Embedding-ready chunks
artifact_values.jsonl Resolved cell values for metric lookup

Each compile run produces a single set of these files. Multiple input workbooks are aggregated into one artifact set: artifact.json and artifact_ui.json hold a top-level files list (one entry per workbook, each tagged with workbook.file_name), and every .jsonl line carries a file_name field identifying its source workbook.

Optional: --enrich-llm (requires spreadsheet-engine[llm] and OPENAI_API_KEY).

Architecture

Workbook → SparseCellStore → BlockDetection → Table/Timeline/Formula analysis
         → Semantic enrichment → Retrieval + UI emitters

Tests

uv sync --extra dev
uv run pytest spreadsheet_engine/tests -q

Place input_1.xlsx at the repo root for e2e tests, or rely on skipped tests when absent.

Related projects

  • spreadsheet-agent — LangGraph Q&A over compiled artifacts (pip install this package, compile to out/, then use the agent).

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spreadsheet_engine-0.1.1.tar.gz (123.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spreadsheet_engine-0.1.1-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file spreadsheet_engine-0.1.1.tar.gz.

File metadata

  • Download URL: spreadsheet_engine-0.1.1.tar.gz
  • Upload date:
  • Size: 123.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.5

File hashes

Hashes for spreadsheet_engine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 095f879cdd1a5cac2d4fe84934739ac4106d5e9c8a6301861cee7187045404d4
MD5 e14c441ef15e156c4147e41ddd65fade
BLAKE2b-256 fc2df2e10ee9ccd65ac8ec04d7e23f050bced3721d934c18822c6fcf2adf45e3

See more details on using hashes here.

File details

Details for the file spreadsheet_engine-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spreadsheet_engine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c63afcf97f8f76ad949cc43fe4f199f09537123078e383a5e9c03a454b9db51
MD5 5c97854abd2602538aef5bb663ad0ef8
BLAKE2b-256 1bba6b665207ef18bb8eba8382f9ec376a20338913184817fc97a82a3643b127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page