M
M
Mazino2019-05-07 18:08:02
Node.js
Mazino, 2019-05-07 18:08:02

How to generate docx from a template in nodejs in a loop and concatenate the result into 1 file?

Submit an idea or share your experience on how to generate a document from a template, say 10 times and collect the result in 1 file?
There is, for example, pattern.docx with the content:

//1 страница
Какой-то текст... Привет {user}!

After processing, result.docx will be collected with the content:
//1 страница
Какой-то текст... Привет Name!

As a result, you need to get a file like:
//1 страница
Какой-то текст... Привет Name!
//2 страница
Какой-то текст... Привет Name2!

etc.
I watched different modules, some generate from scratch, others work with templates.
As I understand it, you need something in between, but there are not enough brains on how to achieve this.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question