Web Component spreadsheet

An Excel-compatible spreadsheet for Web Components: 494 functions, dynamic arrays and xlsx round trips.

Spreadsheet

Early access

$399

Per developer, paid once, lifetime updates

A working starting point

npm install @birchui/element @birchui/core @birchui/spreadsheet
Show index.html
index.html
<birchui-spreadsheet style="display: block; height: 520px"></birchui-spreadsheet>

<script type="module">
  import { createElementClass } from '@birchui/element';
  import { spreadsheetDefinition } from '@birchui/spreadsheet';

  customElements.define('birchui-spreadsheet', createElementClass(spreadsheetDefinition, { optionKeys: ['licenseKey', 'height', 'data'] }));

  const workbook = {
    version: 1,
    sheets: [
      {
        name: 'Loan',
        cells: {
          A1: { value: 'Principal' },
          B1: { value: 250000 },
          A2: { value: 'Annual rate' },
          B2: { value: 0.0625, style: { numberFormat: '0.00%' } },
          A3: { value: 'Payment' },
          B3: { formula: '=PMT(B2/12, 360, -B1)' },
        },
      },
    ],
  };

  const el = document.querySelector('birchui-spreadsheet');
  el.licenseKey = 'LQ1.your-key';
  el.height = 520;
  el.data = workbook;
  el.addEventListener('cell-change', (event) => (({ address, newValue }) => console.info(address, newValue))(event.detail));
</script>

Measured: across 1,520 test formulas, 95.5% of results match LibreOffice. A dependency graph recalculates only the cells an edit affects.

How it fits Web Components

Birch UI Spreadsheet combines a formula engine with a virtualized, keyboard-complete sheet. Formulas, styles, merges and frozen panes survive an xlsx round trip. Web Components mounts it through the generic factory of its adapter.

The element package registers the spreadsheet as a light-DOM custom element. There is no Shadow DOM, so your CSS and the --fe-* theme properties reach every cell.

Set rich options as properties, simple ones as attributes. Only changed keys reach update(). Importing the package never touches HTMLElement, so shared code is safe on the server; define the element in the browser.

Questions

Does the Web Components spreadsheet support LAMBDA?

Yes: LET, LAMBDA and dynamic arrays such as FILTER, SORT, UNIQUE and XLOOKUP, with #SPILL! when blocked.

Is it in early access?

Yes. It is a feature-complete v0.1; structured references and the spill operator are on the roadmap.

Can I use the spreadsheet element without a build step?

Yes, from any ES module setup, including server-rendered pages, Rails, Django, Laravel or plain HTML with an import map.

How are events delivered?

As bubbling, composed CustomEvents with kebab-case names and the payload in detail.