Spire.OfficeJS supports four document types—Word, Excel, PowerPoint, and PDF. The first three can be opened and edited, while PDF is preview-only. For new documents and long-term storage, use DOCX, XLSX, and PPTX, for interoperability with WPS Office, use WPS, ET, and DPS, for external distribution and archiving, use PDF.
Supported Formats
| Document Type | Editor Module | Supported Operations | Formats |
|---|---|---|---|
| Word documents | spiredocument |
Open and edit | DOCX, DOCM, DOC, DOTX, DOTM, DOT, ODT, FODT, OTT, TXT, WPS, WPT |
| Excel spreadsheets | spirespreadsheet |
Open and edit | XLSX, XLSM, XLS, XLTX, XLTM, XLT, CSV, ET, ETT |
| PowerPoint presentations | spirepresentation |
Open and edit | PPTX, PPTM, PPT, PPSX, PPSM, PPS, POTX, POTM, POT, DPS, DPT |
| PDF documents | spiredocument |
Preview only | PDF, XPS |
- Legacy formats (DOC, XLS, PPT) can be opened and edited, saving them as DOCX, XLSX, and PPTX is recommended.
- RTF, HTML, HTM, and MHT are not in the Word open list and must be converted to DOCX first.
- Missing fonts used by a document cause changes in line breaks and pagination. See Font Management for configuration.
- PDF is preview-only, no editing entry is provided.
Saving and Exporting
Saving usually keeps the original format. File data can be passed to your business system through fileAttrs.callbackUrl or editorAttrs.events.onSave. Downloads are available from “File → Download as…”. The table below lists the formats available in that menu; actual options may vary by version or runtime mode:
| Document Type | Download Formats |
|---|---|
| Word | DOCX, DOC, DOCM, DOTX, DOTM, DOT, PDF, RTF, TXT, HTML, XPS, EPUB, WordXML (Word 2003 XML) |
| Excel | XLSX, XLS, XLSM, XLSB, XLTX, XLTM, XLT, CSV, ODS, ET, ETT, PDF, XPS |
| PowerPoint | PPTX, PPT, PPTM, PPSX, PPS, POTX, POTM, DPS, DPT, PDF, XPS, PS (PostScript) |
| Downloads the original file as-is, format conversion is not available |
When called through downloadAs, the supported range is narrower than the table above. See Conversion and Download for accepted values and examples.
In WebAssembly (serverless) mode, downloads are processed by the engine in the browser, so no separate conversion service is required. Cross-format exports reflow the document, so special fonts and complex layouts may render differently, check each page after exporting.
