How to insert data into a Microsoft Word Template using Java?

B.K. picture B.K. · Jul 17, 2013 · Viewed 19k times · Source

I have a map of data that I want to insert into fields in an existing Microsoft Word Template. Preferably, I'd like to accomplish it using Java. I extracted text from a pdf file and then parsed it for data. Now, I need to figure out how to insert that data into a word template, which serves as a form. By data, I mean things such as name, address, etc.

Is it even possible? I haven't been able to locate any documentation or references that would help me with this task. I've been able to find some stuff on creating MS Word documents, but nothing as far as insertion into template text fields.

Answer

sTella picture sTella · Jul 18, 2013

I've used JWord several times to create documents from template. It's not free but accomplished what I needed.