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

@doc-preview/office

v1.1.2

Published

Optional Office format renderers (XLSX, PPTX/ODP slide decks, legacy Office, cloud viewer).

Readme

@doc-preview/office

Optional Office format pack for Doc Preview. Spreadsheets, legacy Word/PowerPoint, PPTX slide decks, and cloud viewer embeds for public HTTPS URLs.

Current release: 1.1.2 — Depends on @doc-preview/core ^1.1.2. See CHANGELOG.

Repository: github.com/rajkishorsahu89/doc-preview

Demo: doc-preview-app.vercel.appformats · Office guide · tool

Keywords: doc-preview office xlsx pptx spreadsheet document-viewer

Supported file types

Requires registerOfficePreviewRenderers() after registerBuiltinPreviewRenderers(). DOCX / DOCM / DOTX and all core formats (PDF, images, CSV, HTML, media, etc.) are handled by @doc-preview/core — not this package.

Spreadsheets (Blob / File upload)

| Extensions | Preview | | --- | --- | | .xlsx, .xlsm, .xltx, .xls, .ods | Multi-sheet tab bar + HTML table (SheetJS); frozen header row; drag-to-resize columns |

Presentations (Blob / File upload)

| Extensions | Preview | | --- | --- | | .pptx, .pptm, .potx | Slide canvas — thumbnails, presenter view, PNG/ZIP/PDF export, shapes, chart data (JSZip) | | .ppt | Legacy OLE — text extraction | | .odp | Same deck UI as PPTX |

Word & OpenDocument (Blob / File upload)

| Extensions | Preview | | --- | --- | | .doc | Legacy OLE — text or officeparser HTML (config.office.legacyDocPreview) | | .odt | OpenDocument HTML via officeparser |

Cloud viewer (public HTTPS URL only)

Not for blob: uploads or private app paths. Configure config.office.cloudViewer: "auto" | "microsoft" | "google".

| Extensions | Providers | | --- | --- | | .doc, .ppt, .pptx, .xlsx, .pdf | Microsoft Office Online and/or Google Docs ("auto" tries both) | | .odt, .ods, .odp | Google Docs viewer |

Full upload accept list (core + office)

Use with config.upload.accept when both packages are registered:

.pdf,.doc,.docx,.docm,.dotx,.odt,.ods,.odp,.xls,.xlsx,.xlsm,.xltx,.ppt,.pptx,.pptm,.potx,.png,.jpg,.jpeg,.gif,.webp,.bmp,.svg,.tif,.tiff,.mp4,.webm,.mov,.mp3,.wav,.m4a,.txt,.md,.html,.htm,.csv,.tsv,.json,.xml,.log

Install

npm install @doc-preview/office @doc-preview/core @doc-preview/themes

Usage

Register once at app bootstrap:

import { registerBuiltinPreviewRenderers } from "@doc-preview/core";
import { registerOfficePreviewRenderers } from "@doc-preview/office";

registerBuiltinPreviewRenderers();
registerOfficePreviewRenderers();

Then use <DocPreview />, <doc-preview>, or createDocPreview() as usual.

config: {
  office: {
    cloudViewer: "auto",       // "auto" | "microsoft" | "google"
    legacyDocPreview: "auto"   // "text" | "html" | "auto" for .doc Blobs
  }
}

Notes

  • Cloud viewer requires a publicly reachable HTTPS URL (not blob: uploads or same-origin app paths).
  • For private files, use Blob/File sources — XLSX, PPTX, legacy .doc, and legacy .ppt render in-browser.
  • PPTX shows positioned layout and chart data tables — not full slide fidelity or rendered chart graphics.

Related packages

License

MIT