A browser-based viewer for Office Open XML documents
An In-Browser Viewer for Office Open XML Documents
OOXML Viewer is a high-performance, open-source JavaScript library designed to render Office files directly within the browser using a powerful combination of Rust, WebAssembly (WASM), and the Canvas 2D API.
@silurus/ooxmlprovides a comprehensive solution for displaying.docx,.xlsx, and.pptxfiles without relying on external dependencies.
🛠️ Technical Architecture
Unlike traditional viewers, this library eliminates the need for server-side document conversion, native software installations, or the use of iframes. Everything happens on the client side.
The rendering process can be conceptually represented as:
Core Pillars:
- Rust/WASM Parsers: The heavy lifting of parsing
.docx,.xlsx, and.pptxis handled by Rust and compiled to WASM for near-native speed. - Canvas Rendering: Visuals are drawn using the
Canvas 2Dinterface for optimal browser performance. - Standard-Compliant: The engine is built based on the and specifications, alongside official Microsoft documentation.
- Flexible Integration: Developers can use the pre-built viewers or leverage the Document APIs to create custom thumbnails, navigation systems, or previews.
🚀 Getting Started
To integrate the library into your project, use the following command:
npm install @silurus/ooxml
Quick Capabilities Checklist:
- Switch between different file formats
- Navigate through pages or slides
- Scroll through expansive spreadsheets
- Zoom and search within documents
📊 Format Support Matrix
While complex documents may still exhibit slight differences compared to the native Microsoft Office suite, the library supports a vast array of features.
| Feature | .docx (Word) | .xlsx (Excel) | .pptx (PowerPoint) |
|---|---|---|---|
| Layout | Paginated, headers, footers, sections | Multi-sheet, frozen panes, outlines | Slide masters & layout inheritance |
| Tables/Data | Complex borders, fills, merged cells | Cached formulas, dates, number formats | Table text selection |
| Visuals | Inline/anchored images, DrawingML | Classic charts, sparklines, conditional formatting | Preset/custom shapes, SmartArt, 3D shading |
| Advanced | CJK typography (ruby, vertical writing) | Pivot metadata, CJK cell text | WordArt, embedded fonts, audio/video |
| Specialty | Math equations, tracked changes | TSV copy, internal links | Classic combo & stock charts |
| Rendering | Progressive virtualized scroll | Range/element context | Progressive virtualized scroll |
| Images | Optional TIFF decoding | Optional TIFF decoding | Optional TIFF decoding |
📢 Latest Announcements
Stay updated with the most recent release and migration notes.
Version History
- v0.84.1 (Sep 1, 2026):
- Word Layout Improvements: Refined spacing for legacy text-boxes.
- Stability: Page-break behavior is now more strictly aligned with original Word document designs.
- v0.84.0 (Sep 1, 2026):
- TIFF Support: Introduced an opt-in feature to display TIFF images across all three supported formats.
- Note: This is enabled by default in the VS Code extension.
- v0.83.0 (Aug 28, 2026):
- Performance: Large
.docxand.pptxfiles now load initial pages/slides faster. - Optimization: Increased speed for large Word tables.
- Fonts: Now utilizes embedded PowerPoint fonts when available.
- Performance: Large
For more details, visit the GitHub Repository or check the full support matrix in the README.