Skip to main content

excel-grapher

Build and analyze dependency graphs from Excel workbooks, evaluate formulas with Excel semantics, and export standalone Python code.

Documentation: https://teal-insights.github.io/excel-grapher/

Why this exists

  • Transpilation support: trace formula dependencies to enable Excel → Python translation.
  • Interpretability: visualize and sanity-check spreadsheet logic (GraphViz, Mermaid, NetworkX).
  • Performance-minded: focuses on targeted dependency closure from specific output cells/ranges.
  • Excel semantics in Python: run workbook logic in-process with a full Excel-like evaluator.
  • Exportable: emit standalone Python packages that embed only the runtime surface you need.

Library layout

The unified distribution is excel-grapher and exposes a single import package, excel_grapher, with five main subpackages:

  • excel_grapher/core/ — shared semantic types, coercions, and scalar operators.
  • excel_grapher/runtime/ — Excel-equivalent function implementations and runtime semantics.
  • excel_grapher/grapher/ — workbook loading, graph extraction, Excel write-back, and visualization logic.
  • excel_grapher/evaluator/ — FormulaEvaluator: an Excel emulator for recomputing formulas in the extracted graph in Python.
  • excel_grapher/exporter/ — CodeGenerator: an transpiler for exporting the extracted graph as a standalone Python library.

Typical imports:

from excel_grapher.grapher import create_dependency_graph, DependencyGraph
from excel_grapher.evaluator import FormulaEvaluator
from excel_grapher.exporter import CodeGenerator
from excel_grapher.core import XlError  # and other shared types, if needed

Installation

Released under the MIT license. Install from GitHub:

Using uv (recommended):

# Basic install (NumPy-free)
uv add git+https://github.com/Teal-Insights/excel-grapher

# With vectorized operator / SUMPRODUCT acceleration
uv add "excel-grapher[fast] @ git+https://github.com/Teal-Insights/excel-grapher"

# With NetworkX support
uv add "excel-grapher[networkx] @ git+https://github.com/Teal-Insights/excel-grapher"

# With all optional dependencies (includes `fast`)
uv add "excel-grapher[all] @ git+https://github.com/Teal-Insights/excel-grapher"

Using pip:

pip install git+https://github.com/Teal-Insights/excel-grapher

# With extras:
pip install "excel-grapher[fast] @ git+https://github.com/Teal-Insights/excel-grapher"
pip install "excel-grapher[networkx] @ git+https://github.com/Teal-Insights/excel-grapher"
pip install "excel-grapher[all] @ git+https://github.com/Teal-Insights/excel-grapher"

The default install is correct without NumPy. Install the fast extra when evaluating large workbooks and you want vectorized operator / SUMPRODUCT acceleration. Exported standalone code stays NumPy-free either way.


High-level usage

The library supports a three-stage pipeline, plus Excel write-back of the same graph views used for Python export:

  1. Build a dependency graph from an Excel workbook (excel_grapher.grapher).
  2. Evaluate formulas with Excel semantics over that graph (excel_grapher.evaluator.FormulaEvaluator).
  3. Export standalone Python (excel_grapher.exporter.CodeGenerator) and/or a new .xlsx from the same GraphReadView (excel_grapher.grapher.write_workbook).

A minimal end‑to‑end example:

from pathlib import Path

from excel_grapher.grapher import create_dependency_graph, write_workbook
from excel_grapher.evaluator import FormulaEvaluator
from excel_grapher.exporter import CodeGenerator
from excel_grapher.series_bindings import load_series_bindings

workbook_path = Path("model.xlsx")
targets = ["Sheet1!A10"]

# 1) Build a dependency graph
graph = create_dependency_graph(workbook_path, targets, load_values=True)
print(len(graph))  # number of visited nodes

# 2) Evaluate with Excel semantics
with FormulaEvaluator(graph) as ev:
    results = ev.evaluate(targets)

# 3a) Export a standalone Python package (requires series bindings)
bindings = load_series_bindings(workbook_path.with_suffix(".bindings.yaml"))
with CodeGenerator(graph) as gen:
    modules = gen.generate_modules(
        series_bindings=bindings,
        bindings_workbook=workbook_path,
    )

# 3b) Write a new workbook from the graph (or a ProjectionResult)
write_workbook(graph, Path("edited.xlsx"))

Series bindings

Optional sidecar manifests (.bindings.yaml) declare structured input/output APIs for exported code — inverted-tree compute_* functions over named tensors and scalars (as_records for a Records view). Validate sidecars from the shell with excel-grapher bindings validate. See the Series bindings guide and Code export guide.

User guide

Detailed documentation lives in the User Guide:

Topic Page
Dependency graphs Read guide
Visualization Read guide
Formula evaluation Read guide
End-to-end demo Read guide
Series bindings Read guide
Code export Read guide
Parity testing Read guide
Contributing Read guide

Examples

Hands-on walkthroughs (Markdown on GitHub):

Topic Walkthrough
Graph extraction extraction_basics.md
Graph evaluation codegen_basics.md
Series bindings series_bindings.md
Induced graph induced_graph.md

Release files for excel-grapher 20.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for excel-grapher 20.6.1
File Size Uploaded
excel_grapher-20.6.1.tar.gz 6.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for excel-grapher 20.6.1
File Interpreter ABI Platform
excel_grapher-20.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 MB

Release files / excel_grapher-20.6.1.tar.gz

Download URL excel_grapher-20.6.1.tar.gz
Size 6.2 MB
Tags Source
SHA-256 checksum
How to use checksums
ee2492e845af92958df03ad72bd901c6d0c6b86e1d185a3cba5b8a5d63020cc4
BLAKE2b-256 checksum
How to use checksums
d082303faceb75d3a4a0845ec40f357c8090e18729f4391b57c6836a168a4ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release files / excel_grapher-20.6.1-py3-none-any.whl

Download URL excel_grapher-20.6.1-py3-none-any.whl
Size 550.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e910db909415fc0b522bf4e25c8dd6a96638b387967b18a3526649d9e1972481
BLAKE2b-256 checksum
How to use checksums
9bf164e58b1ff2d15d9acc3d421d0a8bba8c0593ea64a9a25bfcad9e00b34587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

23.9.0

2 release files

23.8.2

2 release files

23.8.1

2 release files

23.8.0

2 release files

23.7.3

2 release files

23.7.2

2 release files

23.7.1

2 release files

23.7.0

2 release files

23.6.7

2 release files

23.6.6

2 release files

23.6.5

2 release files

23.6.4

2 release files

23.6.3

2 release files

23.6.2

2 release files

23.6.1

2 release files

23.6.0

2 release files

23.5.0

2 release files

23.4.0

2 release files

23.3.1

2 release files

23.3.0

2 release files

23.2.0

2 release files

23.1.0

2 release files

23.0.1

2 release files

23.0.0

2 release files

22.0.0

2 release files

21.9.0

2 release files

21.8.0

2 release files

21.7.0

2 release files

21.6.0

2 release files

21.5.0

2 release files

21.4.0

2 release files

21.3.0

2 release files

21.2.0

2 release files

21.1.0

2 release files

21.0.0

2 release files

20.9.1

2 release files

20.9.0

2 release files

20.8.0

2 release files

20.7.0

2 release files

This release

20.6.1 This release

2 release files

20.6.0

2 release files

20.5.0

2 release files

20.4.1

2 release files

20.4.0

2 release files

20.3.7

2 release files

20.3.6

2 release files

20.3.5

2 release files

20.3.4

2 release files

20.3.3

2 release files

20.3.2

2 release files

20.3.1

2 release files

20.3.0

2 release files

20.2.0

2 release files

20.1.0

2 release files

20.0.0

2 release files

19.0.2

2 release files

19.0.1

2 release files

19.0.0

2 release files

18.0.0

2 release files

17.0.1

2 release files

17.0.0

2 release files

16.0.0

2 release files

12.3.0

2 release files

12.2.0

2 release files

12.1.0

2 release files

12.0.0

2 release files

11.5.0

2 release files

11.4.0

2 release files

11.3.0

2 release files

11.2.0

2 release files

11.1.0

2 release files

11.0.0

2 release files

10.3.0

2 release files

10.2.0

2 release files

10.1.0

2 release files

10.0.0

2 release files

9.1.0

2 release files

9.0.0

2 release files

8.0.0

2 release files

7.0.0

2 release files

6.3.3

2 release files

6.3.2

2 release files

6.3.1

2 release files

6.3.0

2 release files

6.2.0

2 release files

6.1.2

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.2.0

2 release files

5.1.6

2 release files

5.1.5

2 release files

5.1.4

2 release files

5.1.3

2 release files

5.1.2

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.21.0

2 release files

3.20.2

2 release files

3.20.1

2 release files

3.20.0

2 release files

3.19.1

2 release files

3.19.0

2 release files

3.18.0

2 release files

3.17.1

2 release files

3.17.0

2 release files

3.16.0

2 release files

3.15.3

2 release files

3.15.2

2 release files

3.15.1

2 release files

3.15.0

2 release files

3.14.1

2 release files

3.14.0

2 release files

3.13.1

2 release files

3.13.0

2 release files

3.12.0

2 release files

3.11.0

2 release files

3.10.1

2 release files

3.10.0

2 release files

3.9.0

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.9

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page