Hi Anton, Without a reproducible example, I think most people will ignore your email. Working at the level of XML cursors is fiddly and error prone. Trial and error is needed to get anything working.
Stackoverflow might be a better place to seek help because this list is not widely used. If you think it is a bug, raise an issue at https://bz.apache.org/bugzilla . I'm afraid XWPF is not one of the better supported APIs. Regards, PJ On Wednesday 5 October 2022 at 18:18:20 IST, Anton Oellerer <a.oelle...@docu-tools.com> wrote: Hello, I am currently trying to insert a xwpf paragraph into a table with a cursor retrieved from another paragraph in the cell. When inserting text into the xwpf document outside of tables, the following code works flawlessly: document.insertNewParagraph(xwpfParagraph.getCTP().newCursor())) If the xwpfParagraph is inside of a table though, `xwpfParagraph.getCTP().newCursor()` returns a cursor to the paragraph, but `document.insertNewParagraph(...)` returns null, since the internal isCursorInBody check fails. I do not know whether this is a bug or intended, but do you know how to achieve my goal correctly? Best regards Anton Oellerer Junior Backend Developer docu tools GmbH • Gatterburggasse 5 • 1190 Wien T +43 1 890 32 27 27 • a.oelle...@docu-tools.com • www.docu-tools.com FN 531024v HG Wien • UID Nr. ATU75458238 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org