p10node/office-engine
p10node/office-engine has 141 GitHub stars and 10 forks. GitHot measured +4 stars in 24 hours and +19 in 7 days. Last checked 2026-11-18 03:40 UTC. Last push 2026-11-14.
可以做什么
- 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
实测星标增长
- 24小时
- +4
- 7天
- +19
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
在浏览器中查看和编辑 DOCX、XLSX、PPTX 文件。支持渐进式加载、公式和实时协作,并可保存为原始格式。
网站与应用README.md
原文@p10node/office-engine
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.
The demo has samples, heavy files (300k-row sheet, 305-slide deck), drag & drop your own file, edit and download.
Real-time collaboration

300k-row XLSX open in the browser

| DOCX editor | PPTX 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:
<script src="office-engine.embed.js"></script> <!-- 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: format coverage, editing, saving, limitations
- API: props, custom views,
mount(),<office-viewer>, core API, CSP - Real-time collaboration
- Development: playground, architecture, demo deploy, release
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.
| File | Size | First paint | Fully loaded |
|---|---|---|---|
| DOCX 20k paragraphs | 1.2 MB | ~180 ms | 2073 pages in ~2s |
| XLSX 300k rows × 12 cols | 24.8 MB | ~330 ms | ~2s |
| PPTX 305 slides | 0.3 MB | ~110 ms | on-demand |
Measured in headless Chromium on Apple M-series.
License
MIT © p10node

