Spire.OfficeJS is an online Office document editing suite that supports private deployment. It is also an embeddable online Office editor for developers and enterprises that need to integrate document editing into their own web applications. Users can open, view, edit, and save Word, Excel, and PowerPoint documents directly in the browser, and preview PDFs in read-only mode. No Microsoft Office, WPS, or browser plug-in is required on the client.
Rather than fragmented, low-level APIs, Spire.OfficeJS provides a JavaScript Office editor that can be embedded directly into business pages. The page loads SpireCloudEditor.js, prepares a container element, and passes in the configuration; the editor then loads the corresponding interface as an iframe. Document parsing, layout, rendering, and editing are handled by default by the in-browser WebAssembly document engine. This does not mean there is nothing to deploy, however: SpireCloudEditor.js, the editor UI, the WebAssembly engine, and resources such as fonts must still be hosted on a resource service that the browser can reach. For the full product composition and runtime architecture, see Product Composition and Runtime Architecture.
Key Features
- Online editing: Online editing for Word, Excel, and PowerPoint documents; open, view, edit, and save documents in the browser, with "Download as" export.
- PDF preview: Read-only PDF preview within the same interface.
- Collaboration and review: Supports collaborative editing, comments, revisions, and document history.
- UI customization: Supports appearance options such as the menu bar, toolbar, interface language, and multiple layouts, for flexible control over the interface.
Product Composition
Spire.OfficeJS ships three editor modules plus PDF preview, all sharing a single editor entry point and runtime:
| Document Type | Editor Module | Document Engine | Key Capabilities |
|---|---|---|---|
| Word documents | web/editors/spiredocument |
Spire.Doc WebAssembly |
Open, view, edit, save, and "Download as" |
| Excel workbooks | web/editors/spirespreadsheet |
Spire.Xls WebAssembly |
Open, view, edit, save, and "Download as" |
| PowerPoint presentations | web/editors/spirepresentation |
Spire.Presentation WebAssembly |
Open, view, edit, save, and "Download as" |
| PDF documents | — (provided by spiredocument) |
Spire.Pdf WebAssembly |
Read-only preview |
Each editor module offers three interface layouts: desktop, mobile, and embed. For the complete list of supported formats, see Supported File Formats.
Typical Use Cases
| Scenario | Typical Requirement | Role of Spire.OfficeJS |
|---|---|---|
| Document management systems | Online preview, editing, and saving of Office files | Open the editor directly beside the file list, cutting out uploads and downloads |
| OA, approval, and contract systems | Annotations, revisions, permission control, and audit trails | Control edit, comment, and download permissions by role; support review and history |
| Enterprise cloud storage and SaaS platforms | Embed document capabilities into your own product | Fit into existing branding and workflows through configuration and UI customization |
| Online education and training | Assignment grading, courseware preview, and group discussion | Online editing and comments, with read-only mode for presenting materials |
| Archives and knowledge bases | Unified preview across multiple formats | Open Word, Excel, PowerPoint, and PDF documents in a single interface |
How It Differs from Self-Built and Public Cloud Solutions
Integrating document capabilities into a business system involves trade-offs whichever approach you take. First, the download–edit–re-upload workflow is fragmented. Second, building browser-side rendering and editing in-house is costly. Third, relying on server-side conversion adds load. And fourth, public cloud office suites make it difficult to fully align the interface, permissions, and data storage with your business system. Spire.OfficeJS handles document processing inside the browser, covers Word, Excel, PowerPoint, and PDF through a single entry point, and keeps both deployment resources and document data on your side through private deployment—making it well suited to scenarios with requirements around data location, UI branding, and deployment method.
Licensing
Spire.OfficeJS is a commercial component. The license file path is specified through a configuration file in the product package. For details on placing and activating the license, see Spire.OfficeJS License Configuration.
