Skip to content
Genom

Render an Excel workbook in the browser

Both axes virtualised, and the number formats the file asks for.

.xlsx.xlsOne package, every generation — @genomdev/xlsx

Loading the viewer…
sample.xlsxrendered in this tab, nothing uploaded

A sheet of a million rows opens as quickly as one of ten: rows and columns are both virtualised. Cells show what their author saw rather than what the file stores — a cell holding a date stores a number and a format code, and the grammar of those codes is implemented rather than approximated, so a date is a date and a negative currency keeps its parentheses.

The `.xls` tab is one stream of records with structure implied by order, and formulas that arrive already parsed into postfix tokens because Excel never stored the text anybody typed. Same grid renders it.

import { DocumentViewer } from '@genomdev/react';
import { xlsx } from '@genomdev/genom/lazy';

// One package covers every generation of an Excel workbook; the reader is
// chosen from the container, not from the file name.
<DocumentViewer file={file} formats={[xlsx]} fit="width" />;

Put it in your own application

What is above is the published package running in this page, with nothing behind it. The documentation covers the same ground with the API in full.