We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract Table from MHT file

Hi,
I'm using java aspose library
I want to extract tables from the .mht file and delete it from the .mht file
Which method to use for the same and how to do it ?
Hi Akash,

Thanks for your inquiry. Please use following code example to achieve your requirements. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "in.mhtml");

doc.getChildNodes(NodeType.TABLE, true).clear();

doc.save(MyDir + "Out.mhtml");