Solution · Sheets

A spreadsheet with formulas built to recalculate.

An owned formula engine, a keyboard grid, and CSV that will not inject formulas.

Status: in development

Isometric spreadsheet grid and formula bar assembling from violet and pearl cubes

Plan a project budget

Try this

  • Change a quantity or unit price; the row and grand totals recalculate.
  • Toggle formulas to see the owned engine’s expressions as data.
  • Add a line item, then reset to restore the fixture workbook.

Use Reset to return to the starting example.

Project budget loaded. Select a cell or use the controls to explore the formula engine.

If the interactive demo cannot load, use the static preview above.

What you can ship in a sheet

Totals follow every edit

An owned engine parses formulas into the shared AST. Dependents recalculate. The language is closed: no reference from text, and nothing reaches the host except the clock you pass.

  • Formulas
Isometric spreadsheet grid with a formula bar and dashed arrows to dependent cells, built from cubes

Move rows without breaking formulas

Structural edits rewrite references. The workbook engine keeps computed values current. Values paint as text. There is no HTML sink.

  • Structural edits
Isometric spreadsheet with a new row of cubes inserting while dashed formula links rewrite

Hand off CSV that stays inert

Import keeps formula-looking fields as text unless you opt in. Export neutralizes formula injection so a spreadsheet tool will not run them.

  • CSV
Isometric grid exchanging a CSV card through a glass gate that turns formula bars into plain text bars

planned

Work on it together, later

Collaboration on the document sync core is planned, not shipped. Localized formula display and native evaluation are planned too.

  • Collaboration
A spreadsheet grid of flat cubes with highlighted cells and a small rising bar chart

From a workbook to a grid you can edit.

  1. Model

    Validate a workbook and keep every edit in a framework-free model.

    Package: @texuli/sheets

  2. Calculate

    Evaluate formulas and recalculate every dependent cell.

    Package: @texuli/sheets

  3. Edit

    Work the accessible grid and formula bar from the keyboard.

    Package: @texuli/sheets

  4. Exchange

    Import and export CSV. Export neutralizes formula injection.

    Package: @texuli/sheets

Sheets is built from @texuli/sheets, on @texuli/data, texuli, @texuli/core and @texuli/date.

Solution

Sheets

Packages

  • L5@texuli/sheetsFormula engine, workbook model, CSV and grid viewSubpaths: ./formula · ./model · ./csv · ./view

Built on

  • L4@texuli/data (Data views)
  • L3texuli (Styled components)
  • L0@texuli/core (Texels and the URL policy)
  • L0@texuli/date (Date arithmetic)
Four-stage isometric pipeline from a workbook model through calculate and grid edit to a CSV card

Build with Sheets

Start with a sheet

Install

pnpm add @texuli/sheets

Evaluate a formula

import { createWorkbook, displayValue, loadUntrustedSheet } from '@texuli/sheets/model';

const loaded = loadUntrustedSheet("{\"format\":\"texuli-sheet\",\"formatVersion\":1,\"meta\":{\"title\":\"Office budget\"},\"sheets\":[{\"id\":\"costs\",\"name\":\"Costs\",\"rows\":20,\"columns\":4,\"cells\":{\"A1\":\"Desk\",\"B1\":120,\"A2\":\"Chair\",\"B2\":80,\"B3\":\"=SUM(B1:B2)\"}}]}");
if (loaded.ok) {
  const workbook = createWorkbook(loaded.sheet, { now: () => Date.now() });
  console.log(displayValue(workbook.value('costs', 2, 1)));
}

Import CSV

import { csvToSheet } from '@texuli/sheets/csv';

const imported = csvToSheet("item,amount\nDesk,120\nChair,80", { name: 'Orders' });
if (imported.ok) {
  console.log(imported.sheet.sheets[0]?.name);
}

Edit with SheetView

<script lang="ts">
  import { loadUntrustedSheet } from '@texuli/sheets/model';
  import { SheetView } from '@texuli/sheets/view';
  import '@texuli/tokens/base.css';

  const loaded = loadUntrustedSheet("{\"format\":\"texuli-sheet\",\"formatVersion\":1,\"meta\":{\"title\":\"Office budget\"},\"sheets\":[{\"id\":\"costs\",\"name\":\"Costs\",\"rows\":20,\"columns\":4,\"cells\":{\"A1\":\"Desk\",\"B1\":120,\"A2\":\"Chair\",\"B2\":80,\"B3\":\"=SUM(B1:B2)\"}}]}");
  let sheet = $state(loaded.ok ? loaded.sheet : null);
</script>

{#if sheet}
  <SheetView bind:sheet now={() => Date.now()} />
{/if}

Verified by apps/website/tests/solutions/sheets-quickstart.test.ts

Recipes

For agents

Agents emit a spreadsheet as data through the spreadsheet catalog id. The host app checks it with validateDraft and the sheet check before painting; the remote MCP server refuses spreadsheet nodes. The packages are in development.

  • spreadsheetspreadsheet: In development

    Catalog component that carries a whole sheet in its sheet prop.

  • validateDraftvalidateDraft: In development

    Catalog check; spreadsheet nodes pass only with the checkSheet hook from the sheets model.

  • skills/texuli/blueprints/SKILL.mdskills/texuli/blueprints/SKILL.md: In development

    Skill stage J: forms, canvases, sheets and data sources as agent data.

Platforms

  • Web

    Web: In development

    Svelte 5 packages published on npm (pre-1.0).

  • Compose Desktop

    Compose Desktop: Planned

    Kotlin Multiplatform renderer on the JVM, built in this repository.

  • Android

    Android: Planned

    Native renderer target.

  • iOS

    iOS: Planned

    Native renderer target.

How the native renderer works

Start building with Sheets

An embeddable spreadsheet with formulas and CSV.

A low horizon of stacked cubes rising to one glowing pearl cube under a wide open skyA low horizon of stacked cubes rising to one glowing pearl cube under a wide open sky