How to copy a word document into excel

How to copy a word document into excel.I have a word document and i need to copy all content into excel

Hi Ajeesh,

Thanks for your inquiry.

Unfortunately, there is no direct way to convert Word document to Excel. However, it is possible using Aspose.Words+Aspose.Cells. I have attached a simple converter for you (See the attached class). Here is how you should use it:

Document doc = new Document(@"C:\test\in.doc");
ConverterDoc2Xls converter = new ConverterDoc2Xls();
Workbook wb = converter.Convert(doc);
wb.Save("C:\\Test\\out.xls");

Secondly, I think, you can also insert Ms Word document as OLE object into Ms Excel workbook. For more information, please read the following article:

I hope, this will help.

Best Regards,

hi

Thanks for sending me this code and i already have this code with me and iits working.One issue am facing with this code is like if i have any merged column in my word document,its not comming as a merged column in Eccel.Can you look into that issue and give me a solution

Hi
Ajeesh,


Thanks for your inquiry. I managed to reproduce this issue on my side. But, you should not that MS WORD and MS EXCEL documents are completely different file formats. Please refer to the following thread where my colleague Imran has already answered you:
http://www.aspose.com/community/forums/368009/merged-columns-not-displaying-as-merged-when-convert-from-word-to-excel/showthread.aspx#368009

Please let me know if I can be of any further assistance.

Best Regards,