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

Free Support Forum - aspose.com

Where is ConverterXls2Doc written by Alexey?

how to convert xls or xlsx to doc?
where is ConverterXls2Doc demo to download?


Thanks for your inquiry. You can convert Excel documents to Word using Aspose.Words and Aspose.Cells. I have attached here the Java version of this converter i.e. ConverterXls2Doc.zip.

Please let us know if you need more information, We are always glad to help you.

Best Regards,

Thanks a lot

I use aspose-cells-7.0.3.jar,but the sourcecode of the demo dose not match.so it occurs many errors。


Thanks for your request. Most likely, Awais attached old version of the code. Please try using the attached code and let me know if case of any issues.

Best regards,

thanks,it works well.
But when the text of cell in excel is date(etc:2011-12-01),the text is formated as 2011-12-01T00:00:00
When the text of cell in excel is long integer ,the text is formated as
<!–[if gte mso 9]>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;}

How to resolve these questions?



Thanks for your request. I suppose the problem occurs in the following method (see the highlighted code):


/// Get text with formating from Excel cell


/// Input Excel cell

/// Parent document

/// Run that contains text with formating

private Run GetTextFromCell(com.aspose.cells.Cell cell, Document doc) throws Exception


Run run = new Run(doc);



run.setText(cell.getValue().toString().replace(ControlChar.LINE_FEED_CHAR, ControlChar.LINE_BREAK_CHAR));

//Convert Excel Font to Words Font

ImportFont(run.getFont(), cell.getStyle().getFont());


return run;


Here we use toString method, that uses invariant culture to format date and decimal values. You can change the code that that it format values properly.

Best regards,

Thanks.It’s right.The string from cell must be formated.


Please feel free to ask if you need more assistance, we are always glad to help you.

Best regards,