Hi, usign apache-poi-3.7 I think I found a shorter way to do it
/CTTbl tbl = template.getDocument().getBody().insertNewTbl(tableIndex);
tbl.set(original.getCTTbl());
XWPFTable table2 = new XWPFTable(tbl, template);
table2.getRows().get(0).getCell(0).setText("test");/
where
*template*: XWPFDocument
*original*: original table to be duplicated
*tableIndex*: no javadoc found, I suppose is the position of the table, if i
put 0, the "position" of the original table, the duplicated one is created
but completely attached to the original
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/How-to-copy-a-table-and-modify-it-correctly-in-the-same-docx-file-using-POI-tp5716551p5725580.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]