RepositoryTypeScript
p10node

p10node/office-engine

Open & edit documents in the browser: DOCX, XLSX, PPTX, DOC, XLS, PPT, RTF, ODT, ODS, ODP, CSV, TXT, Markdown, HTML, SVG, Mermaid, PlantUML, Graphviz. View-only: Pages, Keynote, Numbers, Visio (VSDX). Zero deps, no server, real-time collab, saves to original format. One-line React embed.

158sao
16fork
5issue
1lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: docx

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: xlsx

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: document-viewer

#1 Repository của tuần

@p10node/office-engine

npm version npm downloads CI License: MIT

View + edit DOCX / XLSX / PPTX directly in the browser. Loads progressively like Google Docs, handles heavy files, one-line React embed, saves back to the original format.

npm · Live demo · Docs

The demo has samples, heavy files (300k-row sheet, 305-slide deck), drag & drop your own file, edit and download.

Real-time collaboration

Real-time collaboration: Ann and Bob edit one sheet side by side, Cara joins from a third browser

300k-row XLSX open in the browser

300k-row XLSX opening in the browser: rows stream in, then a jump to the last row

DOCX editorPPTX editor
DOCX editorPPTX editor

Install

bun add @p10node/office-engine   # peer: react >= 18, react-dom >= 18

Usage

import { DocViewer } from '@p10node/office-engine'

<DocViewer src={file} style={{ height: 600 }} />                 // File | Blob | ArrayBuffer | Uint8Array
<DocViewer src="https://cdn.example.com/report.xlsx" />          // URL → Range requests
<DocViewer src={file} editable onSave={(blob, name) => upload(blob, name)} />

CSS is auto-injected. Container must have a height.

Without React:

   <!-- dist/, bundles React + worker -->
<office-viewer src="/files/report.docx" style="height:600px"></office-viewer>

Docs

Also online at p10node.github.io/office-engine.

Features

  • Progressive loading: lazy ZIP, HTTP Range requests, streaming XML parser in a Web Worker → UI never blocks
  • Virtualized views: only visible pages, cells and slides render
  • Editing with a Google Docs-style toolbar: DOCX text, styles, lists, images, tables; XLSX cells, formulas (134 functions), formats, borders, rows/columns, sheets; PPTX text, shapes, images, slides, slideshow
  • Fast save: only edited parts are regenerated, everything else keeps its original bytes
  • File menu: new, open (also CSV / text / Markdown / HTML), import CSV, rename, download as PDF / HTML / text / CSV, document details, print
  • Real-time collaboration: live edits, avatars, collaborators' cursors, offline edits sync on reconnect
  • Dark mode: theme="dark" or "auto" (follows the OS); documents keep their own colors
  • Embed anywhere: React component, hook, vanilla mount(), <office-viewer> web component, single <script> file

Full list, format coverage and limitations: Features.

FileSizeFirst paintFully loaded
DOCX 20k paragraphs1.2 MB~180 ms2073 pages in ~2s
XLSX 300k rows × 12 cols24.8 MB~330 ms~2s
PPTX 305 slides0.3 MB~110 mson-demand

Measured in headless Chromium on Apple M-series.

License

MIT © p10node

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryShell
ONLYOFFICE/DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.

7.2k
Nov 13, 2026
Repository
ONLYOFFICE/DesktopEditors

Open-source office suite pack that comprises all the tools you need to work with documents, spreadsheets, presentations, PDFs, and PDF forms on Windows, Linux, and macOS

5.8k
Nov 13, 2026
RepositoryTypeScript
dream-num/univer

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

32.4k
Dec 2, 2026
RepositoryTypeScript
genspark-ai/genoffice

Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux.

13.3k
Dec 2, 2026
RepositoryTypeScript
flyfish-dev/file-viewer

Preview 275+ file formats in the browser: Office, PDF, OFD, CAD, 3D, archives. Pure frontend, no server conversion. Vue / React / Svelte / Web Components.

3.2k
Nov 29, 2026
RepositoryTypeScript
dream-num/univer-workspace

Manage the Office content your agents create. An open-source, self-hosted workspace where people and AI agents edit, collaborate, and review changes. Built with Univer Office SDK.

2.2k
Dec 1, 2026
RepositoryTypeScript
baotlake/office-website

Web Office: Local-First & Private. Professional-grade Word, Excel, and PowerPoint editing powered by WebAssembly. Zero data uploads, 100% client-side for uncompromising privacy. 🛡️ 纯本地浏览器 Office,数据零上传,隐私安全。⚡️ Wasm 採用、ローカル完結で究極のプライバシー。🚀 Полная приватность: Wasm-офис без загрузки данных.

1.5k
Apr 25, 2026
RepositoryGo
unidoc/unioffice

Pure go library for creating and processing Office Word (.docx), Excel (.xlsx) and Powerpoint (.pptx) documents

4.9k
Nov 13, 2026
RepositoryTypeScript
XinaTian/MROffice

MR Office — the open-source editors of the AI office suite closest to Microsoft Office: documents, spreadsheets, presentations, PDF and code in the browser. Copilot in every editor edits real Word, Excel and PowerPoint files with you; an MCP server lets Claude, ChatGPT, Cursor and Codex create and edit them; embed it in your app with one line.

4.9k
Nov 26, 2026