Open xlsb and legacy xls files in JavaScript
Most browser spreadsheet tools are built for xlsx. The two binary formats are where they break: xlsb, which Excel writes for large workbooks, and xls, the Excel 97 to 2003 format that still fills archives and regulated systems. Sheetwarden parses both natively in the browser.
xlsb
The binary workbook format stores the same content as xlsx in a record stream instead of XML. Many libraries either reject it or convert the cells only. Sheetwarden reads cells, styles, number formats, defined names, tables, conditional formatting, data validation, charts, drawings, PivotTables, slicers and what-if tables directly from the binary records, and calculates formulas from their binary token streams. Opening is often faster than the equivalent xlsx because there is no XML to parse.
xls (BIFF8 and BIFF5)
Legacy xls files are compound documents containing BIFF record streams and, frequently, drawings in Office's old escher format with pictures stored as EMF, WMF, PICT or DIB. Sheetwarden decodes:
- Cells, formats, fonts, fills, borders, merged cells, row and column dimensions, frozen panes.
- Formulas, defined names, external links and their cached values.
- Charts stored as BIFF chart records, rendered as native charts.
- Drawings and pictures, including EMF and WMF metafiles and classic Mac PICT images, with their own renderers.
- PivotTables, autofilters, data validation, conditional formats, notes and hyperlinks.
- Password protection using RC4, RC4 CryptoAPI and XOR, opened locally with a prompt.
One API for every format
import {{ openWorkbook, calculateWorkbook }} from '@sheetwarden/viewer';
const book = await openWorkbook(bytes, 'ledger-2004.xls'); // or .xlsb, .xlsx, .xlsm
await calculateWorkbook(book);
console.log(book.sheets.map(s => s.name), book.calculation.formulas);The extension selects the parser; the resulting model is the same for every format, so your code does not branch on file type. The viewer, editing, PivotTables and export work identically. Edited legacy files are exported as xlsx, with binary-only details such as the Normal style font carried across.
Why this matters
Archives, e-discovery, insurance, public bodies and finance departments hold decades of xls files, and auditors want to see them as they were. A tool that only handles xlsx forces a conversion step that loses drawings and charts and changes numbers. Reading the original bytes in the browser avoids the step and the questions that come with it.
Related guides
- Render xlsx files in the browser without a server
- Run Excel macros and VBA in the browser
- Alternatives to SheetJS Pro, SpreadJS and Handsontable
Try it now: open the live demo and drop in one of your own files. Nothing is uploaded. Then see the documentation or pricing.