Hi
I need to read a word document table and draw the same table into excel is this posible in aspose,if possible send me the code
Regards
Ajeesh M J
Hi Ajeesh,
Thanks for your inquiry.
I think, in this case, you first need to read Word table into DataTable and then somehow generate Excel document from that DataTable. Using Aspose.Words you can create a DataTable from a table in the document. I’m afraid we don’t have any specific sample code for this, but if you take a look at this following page you will see the reverse (a Datatable to Table) so you can get a similar idea here:
https://docs.aspose.com/words/net/how-to-build-a-table-from-a-datatable/
Once, you read your Word table into DataTable, you can use the following article to generate Excel document:
https://reference.aspose.com/cells/net/aspose.cells/cells/importdatatable/
Moreover, you can also convert whole Word document to Excel by using Aspose.Words+Aspose.Cells e.g:
Document doc = new Document("C:\Temp\sample.doc");
ConverterDoc2Xls converter = new ConverterDoc2Xls();
Workbook wb = converter.Convert(doc);
wb.save("C:\Temp\out.xls");
I have attached the ConverterDoc2Xls.zip file.
If we can help you with anything else, please feel free to ask.
Best Regards,