I was able to get the tables present in a word document using getTablesIterator() on a XWPFDocument.
But is there a way to get table within a table?
Thanks in Advance,
Joel
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In .docx “Table” doesn’t directly contain other tables, but a Table Cell may do. So, you can’t ask a table for its nested tables, you have to get each cell and check those.
From a XWPFTable get your XWPFTableRow instances, then from there a XWPFTableCell. You can then call XPWFTableCell.getTables() to get any tables nested in that one cell.