- Developer home
- Embed editors
- Supported formats
Supported formats
This page is not yet translated into your language; it is shown in English.
Supported formats
Besides .docx, .xlsx, .pptx and .pdf, an embedded editor opens every format MR Office itself opens by converting it, with the same conversions as File › Open. The file is saved back in its own format whenever MR Office writes that format (as File › Save As would); the document.saved callback says so (document.format, saves_as, converted).
| Format | Opens in | Saved back as |
|---|---|---|
.docx | Word editor | .docx, byte for byte where nobody changed it |
.doc, .dot (Word 97-2003) | Word editor | Word 97-2003 (.dot keeps its name: the format is the same) |
.dotx (Word template) | Word editor | .dotx |
.rtf, .odt | Word editor | .rtf, .odt |
.txt, .md | Word editor | plain text, Markdown |
.html, .htm | Word editor | HTML |
.xlsx | Excel editor | .xlsx, byte for byte where nobody changed it |
.xls (Excel 97-2003), .xltx (Excel template), .ods | Excel editor | .xls, .xltx, .ods |
.csv, .tsv | Excel editor | .csv, .tsv (the first sheet, as Excel saves CSV) |
.pptx | PowerPoint editor | .pptx, byte for byte where nobody changed it |
.ppt (PowerPoint 97-2003), .potx (PowerPoint template), .odp | PowerPoint editor | .ppt, .potx, .odp |
.pdf | PDF editor |
- Size limits and billing are the same for every format. A converted file's save writes a new version only when someone changed the document: opening and closing it writes nothing.
- A format that cannot hold everything the editor shows (CSV: one sheet, no formatting; plain text: no pictures) is written as File › Save As writes it; the editor asks the person before a save that would lose something, as for any file.
- file.accept of a file.local token names any of these formats (default: docx, xlsx, pptx, pdf).
File formats
GET /api/v1/embed/formats lists what the running server converts (conversion), what each embedded editor opens (editors) and the CSV options. Formats an editor writes back are saved as themselves; the others open to be read: a session on one opens in view whatever its token asks (effective_mode view, mode_note view_only_format), and it is never saved. To edit one, convert it first and open the result.
| Editor | Opens and saves as itself | Opens to read |
|---|---|---|
| Word | .docx, .doc, .dot, .dotx, .rtf, .odt, .txt, .md, .html, .htm | .docm, .dotm, .ott, .fodt, .sxw, .stw, .wps, .wpt, .mht, .mhtml, .epub, .fb2*, .pages*, .hwp, .hwpx |
| Excel | .xlsx, .xls, .xltx, .ods, .fods, .csv, .tsv | .xlsm, .xltm, .xlsb, .xlt, .ots, .sxc, .et, .ett, .numbers |
| PowerPoint | .pptx, .ppt, .potx, .ppsx, .odp, .odg | .pptm, .potm, .ppsm, .pps, .pot, .otp, .fodp, .sxi, .dps, .dpt, .key* |
| .xps*, .oxps*, .djvu*, .vsdx*, .vsd*, .vssx*, .vstx*, .vsdm*, .vssm*, .vstm*, .png, .jpg, .gif, .bmp, .tiff, .webp | ||
| Code | .py .js .ts .json .css .sql .sh .yaml .java .c .cpp .cs .go .rs .rb .php .swift .tex | — |
| Handwriting | .mrink | — |
- A format marked * needs a reader the server may not have (a LibreOffice part or a program): GET /api/v1/embed/formats lists it under unavailable where it is not read, and such a file is refused with embed_file_unsupported (reason reader_unavailable).
- EPUB opens as a Word document, its chapters in reading order with their pictures. FictionBook, Pages and Hangul 97 / HWP 3.0 files are read by LibreOffice, HWP 5 and HWPX files by MR Office's own Hangul reader, each into a Word document; a Keynote deck into a presentation. An OpenDocument drawing (.odg) opens in the PowerPoint editor and is saved back as a drawing.
- A Visio drawing, an XPS or OpenXPS document, a DjVu document and a picture open as a PDF; a DjVu page's hidden text becomes the PDF's searchable text. An .xml file converts as what it is: Word 2003 XML or a flat Word file as a document, an Excel 2003 XML Spreadsheet as a workbook.
- A PDF (and an XPS, OpenXPS or DjVu document) converts to docx, docm, dotx, dotm, odt, ott, rtf, doc, epub, fb2, html and md through the PDF editor's own conversion to Word (paragraphs, fonts, columns, tables, pictures, headers and footers), to xlsx (its tables as sheets) and to pptx (a slide per page); result.converted_from_pdf names the page it was made into.
- pdfa writes PDF/A from any file: options.pdfa is 1b, 2b (the default) or 3b. Ghostscript converts it, veraPDF must pass it and its pages and text must match the source; result.pdfa gives the level. A PDF with form fields, signatures, comments or actions is refused rather than flattened.
- ott, ots and otp are written as templates, epub as a book, fb2 as a FictionBook 2 book, a presentation's txt as its slides' text, and page images as png, jpg, bmp, gif, tiff or webp. docm, dotm, xlsm, xltm, pptm, potm and ppsm are written from any file of their family; a file that had macros keeps them (result.has_macros), and a macro-enabled file written in its own family is named as what it is (a .docm, not a .docx; result.macro_enabled).
- ONLYOFFICE's Conversion API reads codePage and delimiter the same way and takes outputtype pdfa, fb2, txt and the macro-enabled and template formats; its Document Builder service (…/docbuilder) runs on the builder: see Migrate from ONLYOFFICE.
CSV and TSV
options.csv_input says how a CSV or TSV is read: delimiter (auto by default: found from the first lines; comma, semicolon, tab, pipe, space, colon or the character) and encoding (auto: UTF-8, UTF-16 by its byte order mark, else GB18030; or windows-1252, shift_jis, gbk, big5, koi8-r and the others GET /api/v1/embed/formats lists). options.csv_output says how one is written: delimiter, encoding and bom. A character the encoding cannot write refuses the conversion with embed_conversion_lossy unless options.accept_losses (then it is written as ?).
curl https://mroffice.ai/api/v1/embed/convert \
-H "Authorization: Bearer $MROFFICE_SECRET_KEY" -H "Content-Type: application/json" \
-d '{
"file": { "url": "https://files.example.com/signed/export.csv" },
"output_format": "csv",
"options": {
"csv_input": { "delimiter": "semicolon", "encoding": "windows-1252" },
"csv_output": { "delimiter": "tab", "encoding": "utf-16", "bom": true }
}
}'Not read
HML (Hangul's older XML format) and OFD files: MR Office has no reader for them yet, and says so with embed_file_unsupported instead of guessing.