Using Apache Poi to parse table within a table in a word document

Joel Johnson :

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

Gagravarr :

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Insert table into a word document at a specific position using apache poi

apache poi add table in word document

How to set table dimensions and spacing in word using apache poi in java

Unexplained spacing created in Word Doc table using Apache POI

Line Spacing Inside the Table in Word Using Apache POI

How to put a table inside header of word using java apache poi?

Editing Word Document using Apache POI

Apache POI Word XWPF table direction and alignment

how to add comment to a table of word by apache poi

How to open and paste a new table everytime in an already existing word document in Apache poi?

Creating word document with Apache Poi 3.17, while creating table if table row ends just before the footer, it is creating another blank page?

How to decrease default height of a table row in word using apache poi in java

how to add images side by side word document using apache poi

How to add a hyperlink to image in a Word document using Apache POI?

Is it possible to parse MS Word using Apache POI and convert it into XML?

How to add image with border into table cell in Word with Apache POI?

Apache POI Word Table Cell not updating color (XWPFTableCell)

Apache POI word best way to add text after table

How to change table direction in Apache word poi (XWPF)?

Apache POI 5 : Set hyperlinks in word table cell

Apache POI 5 generate Word table having 30+ columns

Tables in Word - Using page breaks within table

Using excel to add a table in Word document

Parse JSON document into table

Apache POI - Split Word document (docx) to pages

Apache Poi Word document opening gives NullPointerException

Writing äöü to Word using Apache POI

How to insert a table in ms excel using apache java poi

HTML Table Convert Into Excel using of JSOUP & Apache POI in JAVA