npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alaarab/ogrid-react-xlsx

v2.17.3

Published

Drop an xlsx Blob, get a fully featured OGrid — and export grid data back to .xlsx. Wraps ExcelJS + @alaarab/ogrid-react-radix with formula engine + Excel cell references on by default.

Readme

@alaarab/ogrid-react-xlsx

Show an .xlsx, .csv or .tsv file as an OGrid spreadsheet, with sheet tabs, cell references and formulas, and export grids back to .xlsx. Built on ExcelJS and the Radix OGrid kit.

Install

npm install @alaarab/ogrid-react-xlsx

Requires React 18 or 19.

Usage

import { XlsxWorkbookGrid } from '@alaarab/ogrid-react-xlsx';

<XlsxWorkbookGrid blob={file} height={600} />

Other entry points:

  • XlsxGrid renders one sheet of an already-parsed ExcelJS workbook.
  • workbookFromBlob and sheetToGridData parse without rendering.
  • exportToXlsx, workbookFromGridData and xlsxBlobFromWorkbook handle export.
  • mount(node, { blob }) renders into a DOM node for non-React hosts. Call the returned function to unmount.

Untrusted files

A few-KB file can declare a used range of billions of cells. Grid mapping is capped by maxRows, maxCols and maxCells (defaults: 1,048,576 worksheet rows, 1,000 columns, 5,000,000 cells). Pass limits to XlsxGrid/XlsxWorkbookGrid, or the same options to sheetToGridData. When a sheet is cut, the grid shows a notice and sheetToGridData returns truncated with the full size. A NaN limit uses the default, Infinity removes the limit, and other values are rounded down to at least one.

workbookFromBlob(blob, options) and blob-backed XlsxWorkbookGrid also enforce maxFileBytes (default 50 MiB) before reading, and maxUncompressedBytes (default 200 MiB) against the ZIP directory before ExcelJS parsing. Multi-volume archives are rejected. CSV parsing stops at the row/cell limits and drops columns beyond the column limit; parseTruncated indicates that the original extent is unknown. These byte limits can be configured in limits. Pre-parsed workbooks bypass byte checks.

XLSX row/cell limits bound grid mapping, not ExcelJS parsing. ExcelJS still inflates and parses the complete workbook, and ZIP sizes are declared metadata rather than a bound enforced during decompression. Use a trusted or independently bounded parser when a strict parse-time memory limit is required.

Formulas

Imported formulas start with =. Shared formulas expand to each cell's references. Promoting a header row rebases local references, including absolute rows, into grid data coordinates the way deleting that row would in Excel: a range that starts on it shrinks, and a single reference to it becomes #REF!. The grid shows the file's cached result for those formulas instead of recalculating them. Sheet-qualified references keep worksheet coordinates and read other sheets' cached values. The grid preserves cached results for unsupported syntax, functions, named ranges or missing sheets; those formulas remain in sheetToGridData().initialFormulas for export but are not loaded into the live engine.

Export accepts formulas in grid data coordinates, removes the leading =, and adds the worksheet header offset to local references. Keep items and columns in the order used to key the formulas. Export creates one sheet; callers exporting cross-sheet formulas must provide the referenced sheets themselves. Non-finite numeric values become empty cells, and invalid sheet names are sanitized.

Bundle size

ExcelJS is imported statically, because every entry point needs it. To keep it out of your initial bundle, lazy-load the component that uses this package:

const XlsxViewer = React.lazy(() => import('./XlsxViewer'));

For apps without a bundler, use @alaarab/ogrid-react-xlsx-browser.