Html to XLSX -> text data converts to numeric

Hi,


I am using Aspose.Cells version 7.1.2.6 to convert HTML file to XLSX file.

The HTML file contains just a table with header and data rows only. There is a column which holds data like “001298910” , which starts with zeros. This zeros are trimmed (as they are converted to numeric) when converted to XLSX.

I have tried the following:

Aspose.Cells.LoadOptions loadOptions = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Html);
loadOptions.ConvertNumericData = false;
Workbook excel = new Workbook(fileName, loadOptions);
excel.Save(outfileName, Aspose.Cells.SaveFormat.Xlsx);

But this is not working. Please help me in this one. I am in need of urgent help.

Thanks in advance.
Sandeep

Hi,


Thanks for providing us the details and sample code.

Could you try our latest version/fix: Aspose.Cells for .NET v7.5.3.5 if it works fine.

If you still find the issue, kindly post your template HTML file here, we will check your issue soon.

Thank you.

Hi,


Thank you for the quick reply. :slight_smile:
The new version actually worked and the issue is fixed.

But another issue now is that we do not have licence for this version and so it cannot be used. :frowning:

See this error message :
The subscription included in this license allows free upgrades until 09 Apr 2013, but this version of the product was released on 09 Oct 2013. Please renew the subscription or use a previous version of the product.

So is there any other version prior to this date or any other code workaround to fix this issue.

Thanks again
Sandeep

Hi Sandeep,

According to your subscription status, the lastest version that you could use without renewing your license is Aspose.Cells for .NET v7.4.2. I have tested the said version against your issue, and I am sorry to inform that it does not resolve the problem. I have created a HTML file by saving the simple Excel spreadsheet to HTML format by using MS Excel. Loading the HTML with v7.4.2 and saving back to XLSX format omits the leading zeros from the string 001298910.

It seems that, in order to get this issue resolved, you will have to renew your subscription. Please contact Sales Department by dropping an inquiry in Aspose.Purchase forum if you decide to get your subscription renewed.

Hi,


Thanks for the reply. We have started the renewal process but it takes time for the approval and other stuff. So is there any other workaround to do this using any code for the time being. We have a deadline which is getting closer :frowning:

Thanks
Sandeep

Hi Sandeep,


I think you may apply for a 30 days temporary license to accomplish your tasks for the time being, please follow the directions provided here.

Thank you.