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

xlsx-format

v2.0.0

Published

Modern XLSX reader/writer — TypeScript rewrite of SheetJS (XLSX only)

Readme

xlsx-format

npm version CI codecov license node bun browser TypeScript

The XLSX library your bundler will thank you for. Zero dependencies. Fully async. Works in Node.js and the browser.

Documentation | API Reference

npm install xlsx-format
import { readFile, writeFile } from "node:fs/promises";
import { read, write, sheetToJson, jsonToSheet, createWorkbook } from "xlsx-format";

// Read an Excel file into JSON
const workbook = await read(await readFile("report.xlsx"));
const rows = sheetToJson(workbook.Sheets[workbook.SheetNames[0]]);

// Write JSON back to Excel
const sheet = jsonToSheet([
	{ Name: "Alice", Revenue: 48000 },
	{ Name: "Bob", Revenue: 52000 },
]);
await writeFile("output.xlsx", await write(createWorkbook(sheet, "Q4 Sales")));

Why xlsx-format?

Most projects just need XLSX -- but the popular libraries ship with support for dozens of legacy formats, pull in 7-9 runtime dependencies, and lock you into synchronous APIs that block the event loop.

xlsx-format does one thing well: read and write modern Excel files. The result is a library you can actually tree-shake, await, and ship to the browser without a separate bundle.

| | xlsx-format | SheetJS (xlsx) | ExcelJS | | ------------------- | ------------------------------ | ----------------------- | ------------ | | Written in | TypeScript (strict) | JavaScript (with .d.ts) | TypeScript | | Async | Yes (streaming ZIP) | No | Partial | | Module format | ESM + CJS | CJS only | CJS only | | Tree-shakeable | Yes | No | Partial | | Runtime deps | 0 | 7 | 9 | | Browser support | Yes (read / write) | Yes (separate bundle) | No | | Formats | XLSX / XLSM / CSV / TSV / HTML | 30+ formats | XLSX / CSV | | API style | Named exports, async | Namespace object | Class-based | | Test coverage | 91% (Codecov) | Not measured | Not measured | | License | Apache 2.0 | Apache 2.0 | MIT |

For a detailed feature matrix (cell data, formulas, styles, comments, hyperlinks, and more), see Why xlsx-format? in the docs.

Runs everywhere

xlsx-format is fully platform-agnostic -- it never imports node:fs or any other Node.js built-in. This means it works out of the box in browsers, edge runtimes (Cloudflare Workers, Deno Deploy), and Node.js without bundler polyfills.

Node.js -- Pair read() / write() with Node's fs module:

import { readFile, writeFile } from "node:fs/promises";
import { read, write } from "xlsx-format";

const wb = await read(await readFile("input.xlsx"));
await writeFile("output.xlsx", await write(wb));

Browsers -- Use the File API or fetch:

import { read, write } from "xlsx-format";

// Read from a file input
const wb = await read(await file.arrayBuffer());

// Trigger a download
const blob = new Blob([await write(wb, { type: "array" })], {
	type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "output.xlsx";
link.click();

Switching from SheetJS

The API is intentionally close to SheetJS. Three things change:

  1. read() and write() are async (ZIP uses streaming)
  2. Named imports replace the namespace: import { read } from "xlsx-format"
  3. Utility names are camelCase: sheetToJson instead of XLSX.utils.sheet_to_json
- import XLSX from "xlsx";
+ import { read, write, sheetToJson, sheetToCsv } from "xlsx-format";

- const wb = XLSX.read(buffer);
+ const wb = await read(buffer);

- const rows = XLSX.utils.sheet_to_json(ws);
+ const rows = sheetToJson(ws);

- const buf = XLSX.write(wb, { type: "buffer", bookType: "xlsx" });
+ const buf = await write(wb, { type: "buffer" });

Cell objects keep the same shape: { t: "n", v: 42, w: "42" } works exactly as before. For a full function mapping table, see the Migration Guide.

Acknowledgments

Based on the work of SheetJS, originally created by SheetJS LLC. Thank you to the SheetJS team and its contributors for building the foundation this library stands on.

License

Apache 2.0 -- see LICENSE for details.

Copyright (C) 2012-present SheetJS LLC (original work)
Copyright (C) 2025-present Sebastian Software GmbH (modifications)