0
votes

To replace ms word merge-fields with values with apache-poi both in paragraphs and tables with multiple columns.

As docx4j provides the function to replace merge-fields, is there any equivalent function by apache poi. Since I am using some custom tags in Docx file, reading the file in docx4j is ignoring custom tags(xml format "w:xyz").

Input Template

Name «name»

Table :   (Need to add n- number of records to the template)  
ID      Name
«id»    «name»

Output expected :

Name:  Stack

    ID  Name
    1   Java
    2   Apache
1

1 Answers

0
votes

It doesn't.
However there is an apache library for it, called Freemarker.
It is a template engine and fully supports what are you looking for.