One shared editor
A ribbon, name box, formula bar, grid, sheet tabs and status bar live in one web component, with undo and redo and a read-only mode. Bindings add no UI of their own.
Element APIA browser spreadsheet editor for React, Vue, Angular, Svelte, Solid, and vanilla JavaScript. One workbook model with a formula engine and one <xlsx-editor> web component do the work; the framework adapters only wire up lifecycle and events.
npm install @christophervr/xlsx-react-viewerPublished to npm. Each framework package is self-contained: it bundles the editor and brings the workbook model with it.
A ribbon, name box, formula bar, grid, sheet tabs and status bar live in one web component, with undo and redo and a read-only mode. Bindings add no UI of their own.
Element APIA formula engine in ooxml-core parses and evaluates cell formulas, recalculating dependents after each edit. Unknown functions show #NAME? instead of a guessed result.
Features and limitationsFonts, fills, borders, alignment, number formats, merged cells, frozen panes, column widths and row heights are read from the file and drawn by the grid.
Features and limitationsColour scales, data bars, icon sets and cell rules are evaluated over live values; drop-down list validations offer their choices in the grid.
Features and limitationsCommon chart types are drawn as SVG from live cell values. Chart editing is not offered; the chart parts are written back unchanged.
Features and limitationsExcel 97-2003 workbooks load through the shared ole2 codecs inside ooxml-core and save as .xlsx. CSV opens and exports from the active sheet.
Features and limitationsParts the model does not cover (VBA projects, pivot caches, custom XML, chart detail) are carried through on save where the sheet still exists.
ArchitectureThe interface is built for English, French, German, Spanish, and Simplified Chinese through one locale option. Workbook content is never translated.
LocalizationStable means a committed API and a written preservation guarantee, not Microsoft Excel parity. Pivot tables, slicers, macros and external links are preserved but not shown or edited; sparklines are shown but not edited; the function library is large but not complete; password-protected files are unsupported. The features page lists the gaps.
Features and limitationsimport { loadWorkbook, saveWorkbook, sheetToCsv } from 'xlsx-vanilla-viewer';
// Any editor package bundles this loader; it detects .xlsx, .xls or CSV from the bytes.
const workbook = await loadWorkbook(bytes, { fileName: 'Budget.xls' });
console.log(workbook.format, workbook.sheets.map((sheet) => sheet.name));
// Saves as .xlsx (a legacy .xls is converted), or one sheet as CSV.
const xlsx = await saveWorkbook(workbook, 'xlsx');
const csv = sheetToCsv(workbook, 0);import { useState } from 'react';
import { createWorkbook, SpreadsheetEditor } from '@christophervr/xlsx-react-viewer';
export function Editor() {
const [workbook, setWorkbook] = useState(() => createWorkbook());
return (
<SpreadsheetEditor
workbook={workbook}
fileName="Budget.xlsx"
onWorkbookChange={setWorkbook}
/>
);
}To run the demos or work on the editor itself, clone the repository. Bun is required.
bun install
bun run demoYes. One self-contained editor package per framework is on npm, for example npm install @christophervr/xlsx-react-viewer. Each package is versioned on its own. Release policy
The repository is Apache-2.0 licensed.
No. The grid draws what the model understands, the formula engine covers a large but incomplete set of functions, and several workbook features are preserved without being shown or edited. Features and limitations
They are written to open without repair, and the round trip is checked by tests in ooxml-core. That is a design goal, not a claim of lossless export. Architecture
React, Vue 3, Angular, Svelte 5, SolidJS, and plain JavaScript. They share one editor and model; each adapter only handles mounting, property updates, and event forwarding. Framework bindings
Not yet. Real-time collaboration is not implemented for spreadsheets. Collaboration
Yes, read only: values, formulas where they decode, basic formatting, merges and sheet layout load, and the workbook saves as .xlsx.
Unsupported today.
Read the getting-started guide, pick your framework, and try the demo with a workbook of your own. Apache-2.0 licensed, strict TypeScript, and honest about the gaps.