2026-11-27 16:21 UTC

Sheetgraph beta turns spreadsheets into compact maps for AI agents

state: expiredheat: mediumuncertainty: mediumrelevance: mediumspreadsheet-agents context-efficiency structured-dataasharma327Love Spreadsheets

What is this?

Sheetgraph is an open-source Rust library and command-line tool from ash​​arma327 and Love Spreadsheets, the company’s spreadsheet-to-web-app platform. In a Show HN post dated October 30, 2026, its creator announced the beta 0.1 tool and invited feedback. It extracts Excel and Google Sheets workbooks into compact Markdown reports and formula-dependency graphs, while saving workbook data for exact cell lookup and tracing. The GitHub page describes support for multiple spreadsheet formats and agent workflows. Its size-reduction figures are project-provided examples, not independent measurements; the release is explicitly beta, with APIs and report formats subject to change.

Why it matters

This targets a practical agent bottleneck: messy spreadsheets can exceed a model’s context window if dumped as raw cells. A structural summary plus on-demand cell lookup and formula tracing could let agents inspect workbook logic more economically and make spreadsheet-based analysis and automation more feasible. The project’s examples report large token reductions, but reliability on varied real-world files and the quality of agent answers are not independently established here.

Current assessment

New development: an available beta 0.1 spreadsheet-ingestion tool, announced by its creator on Show HN on October 30, 2026; the linked GitHub page was fetched October 29, 2026. It produces an INDEX/REPORT, formula and cross-sheet dependency graph, and compressed workbook data for queries such as cell lookup, search, and precedent/dependent tracing. The repository documents integrations as agent skills for Claude Code, Codex, Cursor and others, plus local-file processing and Google Sheets access with credentials. It says local files stay on the machine, while Google Sheets retrieval requires authentication. The project reports examples including a 141,000-cell workbook represented by a 940-token report versus about 961,000 tokens as a plain dump, and an invoice ledger represented by about 7,000 tokens versus 1.3 million; these are author-provided comparisons, not independent benchmarks. Important limits include incomplete graph edges for dynamic references such as INDIRECT/OFFSET, format-dependent support across file types, and summarized rather than fully retained data beyond the local cell budget. The web results supplied do not independently corroborate adoption, performance, or the release; they do not materially challenge the supplied project description. Track as an early, potentially useful infrastructure layer for spreadsheet agents, with maturity and accuracy still uncertain.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

10-29 18:29 (minted)⭐ origin echo-reconstructedThe furthest-back primary artifact located is the project’s GitHub repository and README; it presents Sheetgraph as a tool built by Love Spr
asharma327 (Love Spreadsheets) on github (echo) · attributed from hn.story.50293148 · published time unknown
—
10-29 17:49first on hacker news · published · lag ?Show HN: Sheetgraph, AI agents can understand complex spreadsheets
asharma327
—
10-29 17:49amplified on hacker news 👑hn.story.50293148
asharma327
peak 1 · 0 comments · 104% of case engagement
10-29 18:22our radar first saw it · lag ?discovery anchor: hn.story.50293148—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Sheetgraph, AI agents can understand complex spreadsheets
Retrieved article excerpt

Open article · Retrieved 2026-10-29T18:23:34.493215+00:00

# sheetgraph

**Turn any spreadsheet into a map an LLM can read in one pass.**

[A 141,000-cell job tracker (≈961k tokens) becomes a 940-token REPORT.md that still shows every formula, lookup and typed-over value](https://raw.githubusercontent.com/asharma327/sheetgraph/main/assets/demo.png)

sheetgraph extracts Excel and Google Sheets (xlsx, xlsm, xls, xlsb, ods, csv) into a short `REPORT.md` plus a **formula dependency graph**, and saves every cell alongside them so an agent can look up exact values when it needs to.

- **About 1,000× smaller.** The job tracker above is 141k cells, ≈961k tokens as a plain cell dump, and 940 tokens as a report. A real invoice ledger (120k cells, 32k formulas) comes out at ≈7k tokens instead of ≈1.3M.
- **Shows where a sheet breaks.** A formula column that someone typed over in 249 places is one line in the report, with exactly where the breaks are.
- **Follows the logic.** Sheet-to-sheet data flow, lookups, links to other workbooks, and `trace` for any cell's precedents and dependents.
- **One local binary.** Written in Rust. Local files never leave your machine, and up to 10 million cells are kept whole.

Made by [Love Spreadsheets](https://lovespreadsheets.com), which turns Google Sheets and Excel files into dashboards, CRMs, forms and other web apps, with a real engineer in the chat.

## Install

macOS and Linux:

```
curl -fsSL https://raw.githubusercontent.com/asharma327/sheetgraph/main/install.sh | sh
```

Windows: download `sheetgraph-x86_64-pc-windows-msvc.zip` from [Releases](https://github.com/asharma327/sheetgraph/releases/latest).

With Rust 1.88 or newer: `cargo install --git https://github.com/asharma327/sheetgraph`.

## Use it with your AI agent

sheetgraph ships as an agent skill, so your agent runs it on its own whenever you ask about a spreadsheet ("what does this workbook do?", "why is this total off?").

**Claude Code:**

```
/plugin install sheetgraph --marketplace asharma327/sheetgraph
```

**Codex, Cursor and other agents:** copy [`skills/sheetgraph/SKILL.md`](https://github.com/asharma327/sheetgraph/blob/main/skills/sheetgraph/SKILL.md) into your agent's skills folder, or paste it into your `AGENTS.md`.

The skill installs the binary if it's missing, extracts the file, reads the report, and drills into exact cells with `cells` and `trace` before quoting numbers.

## Quick start

```
sheetgraph extract budget.xlsx      # writes sheetgraph-out/INDEX.md and sheetgraph-out/budget/
```

Then open `sheetgraph-out/budget/REPORT.md`, or point your AI agent (Claude Code, Cursor, Codex) at `sheetgraph-out/INDEX.md`. See [Giving it to an AI agent](https://github.com/asharma327/sheetgraph#giving-it-to-an-ai-agent).

> **Beta (0.1).** It works on real-world files, but the report format and the library API may still change between releases. Bug reports are welcome: see [CONTRIBUTING.md](https://github.com/asharma327/sheetgraph/blob/main/CONTRIBUTING.md).

## Why it's small

A spreadsheet is mostly repetition. sheetgraph keeps the information and drops the repetition:

| Raw | Becomes |
| --- | --- |
| 3,541 cells `=MONTH(A2)`, `=MONTH(A3)`, … | one **copy-group**: `ƒ1 B2:B3542 ↓ =MONTH(A2)` (formulas grouped by R1C1 form, merged into rectangles) |
| the same lookup in 24 ranges interrupted by typed-over values | one line + *where it breaks and what's in the breaks* (`462 hardcoded values`) |
| 35k rows of data | header + per-column profile (type, range, enum values, number format, which ƒ computes it) + 4 sample rows |
| 2,000 date columns of the same shape | `D…BXZ (2,000 alike) "2021-09-01" … "2026-10-22": ƒ12; num …` |
| per-cell formats / validations | rectangles per distinct style / rule |

On an invoice ledger (120k cells, 32k formulas): **REPORT.md ≈ 7k tokens vs ≈ 1.3M tokens** for a plain cell dump. The job tracker in the image above is generated by [`assets/make_demo_xlsx.py`](https://github.com/asharma327/sheetgraph/blob/main/assets/make_demo_xlsx.py) if you want to reproduce it.

Inspired by [graphify](https://github.com/Graphify-Labs/graphify) (overview report → scoped queries → full graph), but for spreadsheets.

## What a report looks like

An excerpt from `tests/fixtures/features.xlsx`:

```
## 1. Data · A1:G21 · 127 cells · frozen 1r0c
read by: Summary
▸ A1:G21 table 21×7 (127 cells), header row 1
  A "Date": date 2026-01-05 … 2026-05-18 (20 filled)
  B "Region": enum East(5) North(5) South(5) West(5) (20 filled)
  E "Price": num 2.5 … 21.5 fmt $#,##0.00 (20 filled)
  F "Revenue": ƒ1 (20 filled)
ƒ1 F2:F21 ↓ =D2*E2
✓ validation
B2:B21: dropdown [North, South, East, West]
D2:D21: WHOLE_NUMBER_BETWEEN 0, 1000 (strict) help: "Units: Whole units, 0-1000"
◐ conditional formats
F2:F21: cell lessThan 0 → bg#FFC7CE fg#9C0006
table Sales A1:F21 [Date, Region, Product, Units, Price, Revenue]

## 3. Summary · A1:B11 · 13 cells · tab #FF0000
reads: Data (2g), Lists (1g)
ƒ1 B1 =SUM(Sales[Revenue])
ƒ4 B4 ='[Rates.xlsx]Rates'!B2*2 [external]
chart column "Revenue by week" ← 'Data'!F1, 'Data'!A2:A21, 'Data'!F2:F21
```

## Usage

`sheetgraph-out/budget/REPORT.md` is the map: sheets, tables with column profiles, formula groups and how sheets feed each other. Pass several files (and Google Sheets) at once, and `-o <dir>` to write somewhere else.

```
# Google Sheets (ids or URLs) and/or local files, mixed
sheetgraph extract <id|url|file.xlsx>... -o sheetgraph-out --creds service-account.json

# drill down (all read workbook.json.gz; no network)
sheetgraph cells  sheetgraph-out/<wb> "'Revenue Input'!A1:F20"
sheetgraph trace  sheetgraph-out/<wb> "Monthly!E10" --depth 3   # precedents + dependents
sheetgraph find   sheetgraph-out/<wb> "VAT"
sheetgraph sheet  sheetgraph-out/<wb> "Ledger" --full           # untruncated section
sheetgraph report sheetgraph-out/<wb> [--full]                 # re-render without refetching
```

Local files need no credentials. For Google Sheets, credentials are tried in order: `--creds`, `$SHEETGRAPH_TOKEN` (raw access token), `$GOOGLE_APPLICATION_CREDENTIALS`, gcloud ADC (`gcloud auth application-default login`). Service accounts need the sheet shared with their email.

As a library:

```
let auth = sheetgraph::gsheets::Auth::discover(Some("sa.json"))?;
let wb = sheetgraph::load("<spreadsheet id or URL>", Some(&auth), false)?; // or a local path, with auth None
let a = sheetgraph::analyze::analyze(&wb);
let md = sheetgraph::report::render(&wb, &a, &Default::default());
let graph = sheetgraph::graph::build(&wb, &a); // serde_json::Value
```

## Output

```
sheetgraph-out/
  INDEX.md                    every workbook, sizes, links between workbooks (IMPORTRANGE, Excel external links)
  <workbook>/REPORT.md        the map: read this first
  <workbook>/graph.json       nodes (sheets, blocks, formula groups, charts, pivots, externals) + edges
  <workbook>/workbook.json.gz every cell (see Known gaps for very large files): value, formula, display text, style, validation, note, link
  <workbook>/meta.json
```

REPORT.md contains, per workbook: sheet list with used ranges and sheet→sheet data flow; external links (IMPORTRANGE / IMPORTDATA / … with targets resolved from cells, Excel links to other workbooks, refs to deleted sheets, Connected-Sheets data sources); named ranges; function census incl. **non-builtin functions** (Apps Script custom functions / Named Functions / VBA UDFs), dynamic refs (INDIRECT/OFFSET) and volatile functions; scripts (VBA modules from xlsm; Apps Script on request); developer metadata (left by add-ons/integrations).

Per sheet: blocks (tables with column profiles + samples, or small blocks verbatim), formula copy-groups and families with flags (`[array/spills]`, `[external]`, `[dynamic ref]`, `[#REF!]`, error counts), data validation (dropdowns, checkboxes, range-sourced lists), conditional formats, visual formatting regions, merges, filters/filter views, protected ranges, hidden rows/cols, banding, Excel tables, charts and pivots (with source ranges), notes and comments, hyperlinks.

## Giving it to an AI agent

Point the agent at `INDEX.md`, then the `REPORT.md` it needs, and let it run the drill-down commands for exact cells. Notation it should know:

- `ƒN` is formula copy-group N of a sheet. The formula is shown at the group's top-left cell and copied over the range with relative refs shifting: `↓` filled down, `→` across, `▦` both.
- "same formula in N ranges … breaks at X = K hardcoded values" means a formula column was typed over in places. Those breaks are often where numbers stop matching expectations.
- "typed arithmetic" is hand-entered sums like `=3820+3770`: data entry, not logic.
- `▸ range table …` is a data block, one line per column: type and range, `enum` for small value sets, `fmt` for the number format, `ƒN` when the column is computed.
- "same layout as X" means a sheet is a structural clone of an earlier one with different data; `sheetgraph sheet <dir> "<name>" --full` shows it in full.
- `⋯ rows A–B summarized` means a very large sheet's middle rows were summarized per column rather than kept: the column profiles still count every row, but sample rows and `cells` don't show those rows.
- Flags: `[external]` another file, `[dynamic ref]` INDIRECT/OFFSET (graph edges incomplete), `[array/spills]`, `[#REF!]`, `[N errors]`.

## Layout

| module | role |
| --- | --- |
| `model` | source-agnostic full-fidelity workbook (sparse cells, deduped styles/validations) |
| `gsheets` | auth (service account JWT / ADC refresh / token), chunked parallel grid fetch with retry, conversion |
| `xlsx` | calamine: values, formulas, defined names, merges, VBA; csv |
| `ooxml` | xlsx/xlsm package parts calamine skips: styles, validation, conditional formats, comments, hyperlinks, frozen/hidden rows and cols, filters, protection, tables, charts, pivots, external workbook links |
| `formula` | reference lexer (quoted and non-English sheet names, open-ended `A2:A`, whole rows/cols, `'[Book.xlsx]Sheet'`), R1C1 keys, function census |
| `analyze` | copy-groups, families, blocks, cross-sheet edges, externals |
| `report` | REPORT.md |
| `graph` | graph.json |
| `query` | cells / trace / find |
| `store` | on-disk layout, INDEX.md |

## Known gaps

- **Apps Script / macros / add-ons on Google Sheets**: the Sheets API doesn't expose bound scripts, installed add-ons or triggers, and the Apps Script API doesn't work with service accounts. `--apps-script <scriptId>` fetches a project with user OAuth (scope `script.projects.readonly`). Custom functions are still detected from formulas.
- **Local files**: xlsx/xlsm get the same coverage as Google Sheets, plus Excel tables and links to other workbooks (`'[Budget.xlsx]Data'!B2`). Images, shapes, sparklines and slicers aren't read (the report says when a file has them). xls, xlsb and ods get values, formulas, names and merges only.
- Number-format display text (e.g. `$1,234.50`) is only rendered for dates in local files; the format itself is on every cell.
- Spill ranges of array formulas are flagged on the formula but the spilled cells look like plain values.
- INDIRECT/OFFSET targets are dynamic, so those edges are missing (flagged in the report).
- **Very large local files**: up to 10 million cells are kept whole (about 0.2–0.4 GB of memory per million). Past that, a big sheet keeps its last 1,000 rows and its formulas, and summarizes the rows in between per column (counts, min and max, most common values; no sums), so memory stays near 2–3 GB however big the file is (a 160 MB xlsx with 44 million cells: 3 GB, 84 s). REPORT.md's column profiles still count every row and say which rows were summarized; `cells` only lists kept rows, and `find` reports text matches in summarized rows by column. The budget is `xlsx::CELL_BUDGET`; `xlsx::read_limited` takes another.
- **Very large Google Sheets** are read whole, without that budget. Google allows up to 20 million cells, so a sheet near the limit can take several GB of memory.

## Development

```
cargo t
asharma32710
🟧 echo.github ⭐The furthest-back primary artifact located is the project’s GitHub repository and README; it presents Sheetgraph as a tool built by Love Sprasharma327 (Love Spreadsheets)——

Interpretation history

Decision trace