# AI use cases for Open Sheet (lianghsun/open-sheet)

Repo: [lianghsun/open-sheet](https://github.com/lianghsun/open-sheet) | Use cases: 3 | Page: https://dedupedai.com/use-cases/lianghsun-open-sheet/

A TypeScript framework where you write a spreadsheet model as React and export it as a live .xlsx file with formulas intact.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Build a model whose numbers recalculate on change: https://dedupedai.com/use-cases/lianghsun-open-sheet/build-model-that-recalculates/
- Generate a live workbook for every record in a batch: https://dedupedai.com/use-cases/lianghsun-open-sheet/batch-workbooks-from-data/
- Trace a wrong cell to its source and send notes back: https://dedupedai.com/use-cases/lianghsun-open-sheet/review-sheet-logic-in-code/

## How to build a model whose numbers recalculate on change with Open Sheet

Repo: [lianghsun/open-sheet](https://github.com/lianghsun/open-sheet) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Write a P&L as React and export an .xlsx whose formulas update when an assumption moves.

**Who it is for:** A finance analyst or founder who needs a model the reader can change, not a static table of numbers.

**The problem:** Spreadsheets written by agents break silently when rows shift, because cell addresses like B7 go stale.

**The outcome:** An .xlsx with live formulas and named assumptions, such as =B4*growth, that recalculates in the recipient's spreadsheet app.

### Steps

1. `npx @open-sheet/cli init my-sheets`
2. `cd my-sheets && npm install && npm run dev`
3. Describe the P&L to your coding agent and have it write the React source using references such as `ref('pl').column('revenue')`.
4. Check the sheet in the viewer, then use its export option to download the `.xlsx`. (inferred, check the README)
5. Open the workbook, change the growth assumption, and confirm the net income column moves.

### Prompt to paste into your agent

```text
In the open-sheet repo at <project path>, write a P&L sheet from this description: <description of revenue, costs and assumptions>. Use references such as r.cell and ref().column, with no A1 addresses, then export the .xlsx to <output path>. Verify that changing the growth assumption in the exported file moves the net income column.
```

### Caveat

The README says nothing is published to npm yet but also says 0.1.0 is published, so confirm the npx command resolves before relying on it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lianghsun-open-sheet/build-model-that-recalculates/

## How to generate a live workbook for every record in a batch with Open Sheet

Repo: [lianghsun/open-sheet](https://github.com/lianghsun/open-sheet) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Turn each row of incoming data into its own .xlsx, with formulas kept rather than baked values.

**Who it is for:** An operations or finance lead who receives hundreds of invoices or monthly packs from a data pipeline.

**The problem:** Hand-building or editing each file does not scale, and workbooks with baked numbers hide the logic behind them.

**The outcome:** One rebuilt .xlsx per record, each with live formulas, regenerated whenever the source data changes.

### Steps

1. `npx @open-sheet/cli init my-sheets`
2. `cd my-sheets && npm install`
3. Write one sheet source file whose data array is filled from your pipeline's records.
4. `npm run dev` and check one generated sheet in the viewer.
5. Run the export once per record and store each `.xlsx` in your output folder. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the open-sheet repo at <project path>, create a sheet template that reads the rows in <input file> and exports one .xlsx per row to <output folder>. Each file must keep its formulas instead of values. Verify that the number of exported files equals the number of input rows and that formula cells remain formulas in one sample file.
```

### Caveat

The README does not describe a batch export command, so confirm how per-record export works in the source before automating it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lianghsun-open-sheet/batch-workbooks-from-data/

## How to trace a wrong cell to its source and send notes back with Open Sheet

Repo: [lianghsun/open-sheet](https://github.com/lianghsun/open-sheet) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use inspect mode to see a cell's source line and formula, then leave a note for your agent.

**Who it is for:** A reviewer who must check a model's numbers before a board, client or colleague sees them.

**The problem:** Reviewing a binary spreadsheet diff is slow, and it is hard to tell which logic produced a wrong number.

**The outcome:** Each questioned cell traced to its source line, resolved formula and computed value, with the agent applying the notes.

### Steps

1. `cd my-sheets && npm install && npm run dev`
2. Open the viewer and turn on inspect mode.
3. Click a cell to see its source line, its resolved formula and its computed value.
4. Leave a note on any cell that looks wrong.
5. Ask your agent to apply the comments with the `/apply-comments` skill, then check any cell still showing `#NOT_EVALUATED`.

### Prompt to paste into your agent

```text
In the open-sheet project at <project path>, collect the notes left in inspect mode on the sheet <sheet name> and apply them with the /apply-comments skill. Expected output: the source file edited for each note. Verify by listing any cell that still shows #NOT_EVALUATED and explaining why.
```

### Caveat

The README names /apply-comments as a skill but does not say which agents load it, so confirm your agent reads the scaffolder's skills.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lianghsun-open-sheet/review-sheet-logic-in-code/
