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

Free Support Forum - aspose.com

Problem extracting tables from a word document

We are using Aspose.Word (for Java). When i use this to extract a word document that contains tables, it extracts the text and retains the table formatting. But i don’t see the table border.

I have attached the part of the code that extracts the word doc.

Please let me know if this can be fixed.


You are converting a Word document into plain text. Borders are not converted.

Thanks for your inquiry. You can try creating your own converter to achieve what you need. Please see the attached class. Also see the following code:

// Open document
Document doc = new Document("C:\\Temp\\in.doc");
String docString = CustomToTxtConvertor.Convert(doc);
// Save output
FileWriter txtFileWriter = new FileWriter("C:\\Temp\\out.txt");
The output looks like the following 

|Test |Test |Test |Test |Test |
|Test |Test |Test |Test |Test |
Best regards.