i am new to docx4j and openDoPE .
I have a template docx file which i have to populate with data. I use Content Control Toolkit to add the binding.
To fill the template with data i use the ContentControlsMergeXML example which works ok.
But the problem is that it adds only the one exisitng row to the tables (see Off66394.docx).
How do i add more rows to the table?
I thought manipulating the custom.xml (see code below) and binding it to the template file would be sufficient.
- Code: Select all
<dok>
<Text1>Wow
</Text1>
<Text2>Wow2
</Text2>
<Table1>
<items>
<item>
<Table1Col1>AA
</Table1Col1>
<Table1Col2>BB
</Table1Col2>
<Table1Col3>CC
</Table1Col3>
</item>
<item>
<Table1Col1>AAA
</Table1Col1>
<Table1Col2>BBB
</Table1Col2>
<Table1Col3>CCC
</Table1Col3>
</item>
</items>
</Table1>
<Table2>
<items>
<item>
<Table2Col1>AA
</Table2Col1>
<Table2Col2>BB
</Table2Col2>
<Table2Col3>CC
</Table2Col3>
</item>
<item>
<Table2Col1>AAA
</Table2Col1>
<Table2Col2>BBB
</Table2Col2>
<Table2Col3>CCC
</Table2Col3>
</item>
</items>
</Table2>
</dok>
What am i doing wrong?