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

Free Support Forum - aspose.com

Issue in convert word to excel


Am attaching a code ,which i got from Aspose team.The attached code will convert a word document to Excel,and its working as expected.Now my issue is after converting from word to excel,the out put is not looks excatly like word.that is column width,merge like that properties are not working..How to achive these.Can youi plese see my attached.and what wrong i am doing in code.or there is any other way to achive convert word to excel


Ajeesh M J

Hi Ajeesh,

Thanks for your inquiry. First of all, please note that Microsoft Word and Microsoft Excel documents are completely different file formats; so, some features that are available in Microsoft Word are not available in Microsoft Excel and vice versa and it is hard to convert from Word to Excel and from Excel to Word with 100% fidelity.

Regarding your query, please comment the following code snippet from UpdateLayout method. Hope this helps you. If the problem still remains, please attach your input Word file and expected output Excel file with us. We will investigate the issue on our side and provide you more information.

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:green;mso-no-proof:yes”>////Resize
merged cells<o:p></o:p>

//for (int columnIndex = 0; columnIndex < columnsCount; columnIndex++)


// excelWorksheet.Cells.SetColumnWidthPixel(columnIndex, (int)(bodyWidth / columnsCount));