WORKER / WASM DEMO

A forecasting model across sheets

Use formulas, named areas, and spill results as one model rather than isolated grid features.

Try this

  1. Inspect the summary row and its dependent inputs.
  2. Change a value in the order data.
  3. Follow a formula result back to its source sheet.

How it works

Formula parsing, dependency tracking, and calculation live in the workbook engine. The grid is a projection client, which keeps editing and calculation on the same authoritative workbook.

View source

import type {
  WorkerWorkbookBackendSheet,
  WorkerWorkbookBackendSheetInput,
  WorkerWorkbookClient,
} from '@einfach/solid-excel/vnext'

export const formulaEngineSheets: WorkerWorkbookBackendSheetInput[] = [
  { id: 'inputs', name: 'Inputs' },
  { id: 'model', name: 'Model' },
  { id: 'summary', name: 'Summary' },
]

function text(client: WorkerWorkbookClient, sheet: number, address: string, value: string) {
  return client.setCell(sheet, address, { type: 'text', value })
}

function number(client: WorkerWorkbookClient, sheet: number, address: string, value: number) {
  return client.setCell(sheet, address, { type: 'number', value })
}

function formula(client: WorkerWorkbookClient, sheet: number, address: string, value: string) {
  return client.setFormulaDetailed(sheet, address, value)
}