
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
docxtemplater
Advanced tools
Generate docx, pptx, and xlsx from templates (Word, Powerpoint and Excel documents), from Node.js, the Browser and the command line
docxtemplater is a library to generate docx/pptx documents from a docx/pptx template. It can replace {placeholders} with data and also supports loops and conditions. The templates can be edited by non-programmers, for example your clients.
docxtemplater is very robust because of the many fixed issues over the years, and the high quality of tests and code.
The full documentation of the latest version can be found here.
See CHANGELOG.md for information about how to migrate from older versions.
Functionality can be added with the following paid modules :
{%image};{~html};{$chart};{~html};{:users};{:include doc};{:subsection doc};{:include doc};{r@wrun}. This makes it possible to include styled text without having to remove the enclosing paragraph like in the {@rawXml} tag;{:table data};{:stylepar style};{:footnotes foot}{?tag}Docxtemplater is my main job, and has been maintained for over 8 years. Expect to get great support if you buy any modules, and also good support on the open-source version.
Handlebars is a popular templating engine that can be used for generating HTML, but it can also be adapted for other text-based formats. Unlike Docxtemplater, Handlebars does not natively support DOCX files, so additional processing would be required to integrate it with Word documents.
Mustache is another logic-less templating engine similar to Handlebars. It is used for rendering templates in various formats, but like Handlebars, it does not directly support DOCX files. It is more general-purpose compared to Docxtemplater, which is specifically designed for Word documents.
jsreport is a reporting platform that can generate various document formats, including DOCX. It provides more comprehensive reporting features compared to Docxtemplater, such as scheduling and web-based editing, but it is also more complex to set up and use.
FAQs
Generate docx, pptx, and xlsx from templates (Word, Powerpoint and Excel documents), from Node.js, the Browser and the command line
The npm package docxtemplater receives a total of 371,902 weekly downloads. As such, docxtemplater popularity was classified as popular.
We found that docxtemplater demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.