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

@lacspace/xlsx

v1.1.0

Published

Read and write real Excel (.xlsx) files with zero dependencies and no headless browser — objects or arrays to a workbook, correct types (string/number/boolean/Date), bold headers, column widths, multiple sheets, plus a reader (xlsxToJson / readWorkbook /

Readme

@lacspace/xlsx

Write real Excel (.xlsx) files with zero dependencies — no SheetJS, no exceljs, no headless browser.

npm version minzipped types license

"Export to Excel" for any dashboard — without the weight. A .xlsx file is just a ZIP of a few XML parts, so this builds the bytes directly (the same trick as @lacspace/pdf). The incumbents are large and Node-centric; this is tiny and runs on Node, edge and the browser.

  • 📊 Objects → a sheet (headers from keys or explicit columns), or array-of-arrays
  • 🔢 Correct types — string, number, boolean and real Excel dates
  • 🅱️ Bold headers, column widths, multiple sheets
  • 📦 Output Uint8Array — stream it, download it, save it · zero deps · isomorphic

Install

npm install @lacspace/xlsx      # or pnpm add / yarn add / bun add

Objects → spreadsheet

import { jsonToXlsx } from "@lacspace/xlsx";
import { writeFileSync } from "node:fs";

const bytes = jsonToXlsx([
  { name: "Ada Lovelace", signups: 12, active: true, joined: new Date("2026-01-15") },
  { name: "Alan Turing",  signups: 7,  active: false, joined: new Date("2026-02-01") },
]);

writeFileSync("users.xlsx", bytes);                 // Node
// or serve a download:
return new Response(bytes, {
  headers: {
    "content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "content-disposition": 'attachment; filename="users.xlsx"',
  },
});

Multiple sheets, columns & widths

import { Workbook } from "@lacspace/xlsx";

const bytes = new Workbook()
  .sheet("Users", rows, {
    columns: [
      { header: "Name", key: "name", width: 28 },
      { header: "Sign-ups", key: "signups", width: 12 },
    ],
  })
  .sheet("Totals", [["Metric", "Value"], ["Users", 2], ["Revenue", 4500]], { header: true })
  .toBytes();

API

| Export | Description | | --- | --- | | jsonToXlsx(rows, opts?) | array of objects → .xlsx bytes | | aoaToXlsx(rows, opts?) | array of arrays → .xlsx bytes | | new Workbook().sheet(name, rows, opts?) | multi-sheet builder | | .toBytes() · .toBase64() | output | | columnLetter(i) | 0 → "A", 26 → "AA" |

Values map to Excel types automatically (Date → a real date cell). Free under the Lacspace Free Licence.

Licensing

This package is free under the Lacspace Free Licence — permissive freedoms. Use it in personal and commercial projects at no cost; just keep the notice.

Not every Lacspace package is free. We also offer Commercial, Client-specific and Private packages under separate terms — see the Lacspace Licence Centre.


The Lacspace Developer Platform

@lacspace/xlsx is part of 63 zero-dependency, isomorphic TypeScript packages — one standard library for the modern web. Explore the ecosystem:

  • 📦 This package, documented — https://developer.lacspace.com/packages/xlsx
  • 🗂️ All 63 packages — https://developer.lacspace.com/packages
  • 🧭 Developer handbook — guides & runnable recipes — https://developer.lacspace.com/handbook
  • 🧪 Live playground — run any package in your browser — https://developer.lacspace.com/playground
  • 🖥️ Finished app templates — https://templates.lacspace.com
  • 🚀 Scaffold a full appnpm create lacspace-app@latest

Free under the Lacspace Free Licence — a permissive, free-to-use licence.