Supported formats

The lists below are what get_supported_formats returns on server 26.11.0. The library’s canonical matrix: supported document formats.

Templates and what they can be saved as

FamilyTemplate formatsSave formats
Word processingDOCX, DOC, DOCM, DOTX, DOTM, DOT, RTF, ODT, OTT, TXT, MD, HTML, HTM, MHTML, XML, WordMLDOCX, DOC, DOCM, DOTX, DOTM, DOT, RTF, ODT, OTT, TXT, MD, HTML, MHTML, XML, WordML, PDF, XPS, EPUB, PS, PCL, SVG, TIFF
SpreadsheetXLSX, XLS, XLSM, XLSB, XLTX, XLTM, XLT, ODSXLSX, XLS, XLSM, XLSB, XLTX, XLTM, ODS, HTML, MHTML, XML, PDF, XPS, PCL, TIFF
PresentationPPTX, PPT, PPTM, PPS, PPSX, PPSM, POTX, POTM, POT, ODP, OTPPPTX, PPT, PPTM, PPS, PPSX, POTX, POT, ODP, OTP, HTML, PDF, XPS, TIFF
EmailMSG, EML, EMLXEML, EMLX, MSG and every Word-processing save format

Data

KindExtensionsHow the template sees it
JSON.json, or inline dataJsonan object’s keys are the names the template uses; an array is named after the template’s data source
XML.xmlnamed after the template’s data source
CSV.csv, .tsvone collection; first row is column names unless hasHeaders: false; csvDelimiter sets the separator
Document tableXLSX, XLS, XLSM, XLSB, ODS, DOCX, DOC, ODT, RTF, PPTX, PPT, ODPa table of the document (a worksheet for spreadsheets), chosen with dataTable

Three rules that explain most results

  • Text templates can be inspected; binary ones cannot. DOCX, XLSX, PPTX, Markdown, HTML and EML templates are read by get_template_fields; DOC, XLS, PPT and MSG templates are not — generate them with inlineErrors: true to see their problems, and pass dataSourceName with array, CSV or table data.
  • Markdown and HTML are templates too. product-readme.md with <<[product]>> tags generated a DOCX in our tests; a Markdown template can be saved as any Word-processing format.
  • E-mail output needs a license to look right. In evaluation mode the HTML body of an e-mail template is replaced by the evaluation line.