Hi, I am facing the same problem. The insertTable() method correctly adds the table into the body element list (correct position between two paragraphs). But when the document is written, all tables end up at the end of the document. However tables inserted by ms word remain at their original location.
Cheers Brian -----Ursprüngliche Nachricht----- Von: Mark Beardsley [mailto:[email protected]] Gesendet: Samstag, 26. Februar 2011 13:22 An: [email protected] Betreff: Re: Replacing placeholder to a Table. Hello again Andre, I do not know if you are stil working on this problem but I have been a little today and can report no p[rogress at all. It is a trivial task to build a document sequentially; inserting a new paragraph followed by a table followed by another paragraph, etc, but I cannot yet find a way to insert a table between two existing paragraphs; whatever I try, the table simply appears at the end of the document. I think that the key lies in one of two places - allowing us to directly update either the tables list or the body elements list, both of which are protected and so inaccessible to client code. To date, I have not looked at the source of the XWPF class but suspect that this is the way the insertTable() and setTable() methods try to work. It would be perfect if we could use the set/insertTable methods to allow us to position a table in the document in it's correct location and I will look to see if this is possible. As always, will be in touch if I make any progress. Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Replacing-placeholder-to-a-Table-tp3392424p3401338.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]
