4

How can I get data passed from NodeJS into placeholders of a OpenOffice template file? Is there any npm packages available to parse an ODT template file so that I can print data into it?

I have a 13 page word file (a template for printing reports) and I want to populate it with certain details from the DB into the different pages of this file. I like to pass the data in JSON format.

What I know is how to write into a plain text/excel file from node, but I want to write into the placeholders of a word template without loosing other parts of the template. I did the same with VBScript (with microsoft word template) in the past. Now want to achieve the same using nodejs. Please share with me your ideas..thanks

Jasnan
  • 4,054
  • 2
  • 18
  • 23
  • 1
    I wrote a library to do what you need. But is written in Python. You may check it at https://github.com/christopher-ramirez/secretary. – Christopher Ramírez Sep 08 '14 at 17:04
  • @ChristopherRamírez thanks..you have written exactly what I want. But, I need it in node. Anyway, if I didn't get other out of the box solution, at least I can go through your code to see if I can create a node-package from it. – Jasnan Sep 09 '14 at 05:05
  • @jasnan did you create it? I'd be interested in the result ! – PA. Jan 13 '23 at 13:08

0 Answers0