Answer the question
In order to leave comments, you need to log in
How to create DOCX using node.js and JSON data?
Good afternoon! How can a normal list be generated from an array of data?
I use the docx library
Generating a file is not a problem, but creating a list, for example, from an array does not work
records.forEach(record => {
doc.addSection({
children: [
new Paragraph({
text: `${record.name} - ${record.id}`,
}),
],
});
});
Answer the question
In order to leave comments, you need to log in
Here is an example of creating a list in a document.
You need to replace the paragraph with numbering and specify nesting levels
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question