Re: Can I extract tables from Word documents and convert them to html strings?

code extract only one table i want extract all tables in word dcuments

Hi Osama,

Thanks for your inquiry. You can loop through Tables collection and export them to HTML strings as follows:

for(Table tab : (Iterable<Table>) doc.getChildNodes(NodeType.TABLE, true)){
    String tabHtml = tab.toString(SaveFormat.HTML);

I hope, this helps.

Best regards,