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

office-oxide

v0.1.1

Published

Fast Office document processing (DOCX/XLSX/PPTX/DOC/XLS/PPT) for Node.js — native bindings backed by the Rust office_oxide library.

Readme

office-oxide for Node.js — The Fastest Office Document Library for JavaScript & TypeScript

Native Node.js bindings for office_oxide — a fast Rust library for parsing, converting, and editing Office documents (DOCX, XLSX, PPTX, DOC, XLS, PPT).

Links directly against the Rust C FFI via koffi. No node-gyp build step. Pre-built native libraries are shipped for Linux, macOS, and Windows (x64 + arm64).

npm License: MIT OR Apache-2.0

Part of the office_oxide toolkit. Same Rust core, same pass rate as the Rust, Python, Go, C# / .NET, and WASM bindings.

For running in browsers, Deno, Bun, or edge runtimes, use the sibling office-oxide-wasm package instead.

Quick Start

npm install office-oxide
import { Document } from 'office-oxide';

const doc = Document.open('report.docx');
try {
  console.log(doc.format);       // "docx"
  console.log(doc.plainText());
  console.log(doc.toMarkdown());
  console.log(doc.toIr());       // structured, format-agnostic IR
} finally { doc.close(); }

With the disposable protocol (Node 22+):

using doc = Document.open('report.docx');
console.log(doc.plainText());

Why office-oxide?

  • Fast — 0.8ms mean DOCX, 5.0ms mean XLSX, 0.7ms mean PPTX; up to 100× faster than python-docx / openpyxl / python-pptx
  • Reliable — 100% pass rate on valid Office files (6,062-file corpus); zero failures on legitimate documents
  • Complete — 6 formats: DOCX, XLSX, PPTX + legacy DOC, XLS, PPT
  • Permissive — MIT / Apache-2.0, no AGPL or GPL restrictions
  • No node-gyp — Ships pre-built native libraries; no C++ build toolchain required
  • Full TypeScript support — Type definitions ship in the package

Performance

Benchmarked on 6,062 files from 11 independent public test suites. Single-thread, release build, warm disk cache.

| Library | Format | Mean | Pass Rate | License | |---------|--------|------|-----------|---------| | office_oxide | DOCX | 0.8ms | 98.9% | MIT | | python-docx | DOCX | 11.8ms | 95.1% | MIT | | office_oxide | XLSX | 5.0ms | 97.8% | MIT | | openpyxl | XLSX | 94.5ms | 96.2% | MIT | | office_oxide | PPTX | 0.7ms | 98.4% | MIT | | python-pptx | PPTX | 32.5ms | 86.7% | MIT |

Installation

npm install office-oxide

The native shared library is resolved (in order):

  1. OFFICE_OXIDE_LIB environment variable (absolute path).
  2. prebuilds/<platform>-<arch>/liboffice_oxide.{so|dylib|dll} inside the npm package.
  3. The system library search path.

| Platform | x64 | ARM64 | |---|---|---| | Linux (glibc) | Yes | Yes | | macOS | Yes | Yes (Apple Silicon) | | Windows | Yes | Yes |

Requires Node.js 18 or newer. TypeScript definitions ship in the package.

Editing

import { EditableDocument } from 'office-oxide';

using ed = EditableDocument.open('template.docx');
ed.replaceText('{{NAME}}', 'Alice');
ed.save('out.docx');

Spreadsheet cells

using ed = EditableDocument.open('report.xlsx');
ed.setCell(0, 'A1', 'Revenue');
ed.setCell(0, 'B1', 12345.67);
ed.setCell(0, 'C1', true);
ed.save('report.edited.xlsx');

One-shot helpers

import { extractText, toMarkdown, toHtml } from 'office-oxide';

console.log(extractText('doc.docx'));
console.log(toMarkdown('deck.pptx'));
console.log(toHtml('data.xlsx'));

API

TypeScript definitions ship with the package (office-oxide/lib/index.d.ts).

| Export | Description | | --- | --- | | Document.open(path) / fromBytes(data, format) | Parse a read-only document. | | Document#format | "docx" \| "xlsx" \| … | | Document#plainText() / toMarkdown() / toHtml() / toIr() | Extraction methods. | | Document#saveAs(path) | Save/convert to a different format. | | EditableDocument.open(path) | Open DOCX/XLSX/PPTX for editing. | | EditableDocument#replaceText(find, replace) | In-place replace. Returns count. | | EditableDocument#setCell(sheet, ref, value) | Write an XLSX cell. | | EditableDocument#save(path) | Persist to disk. | | version() / detectFormat(path) | Library info. | | extractText(path) / toMarkdown(path) / toHtml(path) | One-shot helpers. |

Other languages

office_oxide ships the same Rust core through six bindings:

Why I built this

I needed a library that could read all six Office formats at once — not six separate packages — and I needed it without pulling in a JVM, a Python runtime, or a GPL-licensed dependency. The same Rust binary powers Python via PyO3, Node.js via koffi, Go via cgo, C# via P/Invoke, and the browser via WASM — one fix lands everywhere.

If something's broken or missing, open an issue.

— Yury

License

MIT OR Apache-2.0


Node.js + Rust core | MIT / Apache-2.0 | 100% pass rate on valid Office files (6,062-file corpus) | Up to 100× faster than alternatives | 6 formats