Open Excel/html file

Hi, We have a lot of files that seems to be html:

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">








Hi,

Thanks for your posting and using Aspose.Cells.

Please download and try the latest version: Aspose.Cells
for .NET v8.3.2.3
it should fix your issue.

We have tested this issue with the following sample code and it successfully generated the xls file which we have attached for your reference.

C#


string filePath = “F:\Shak-Data-RW\Downloads\template.xls”;


HTMLLoadOptions opts = new HTMLLoadOptions(LoadFormat.Html);


Workbook workbook = new Workbook(filePath, opts);


workbook.Save(filePath + “.out.xls”);

It doesn't seems to work for me.

I downloaded the last Aspose.Cells for .NET v8.3.2.3.

My VB code is:

Try

Dim filePath As String = "C:\temp\Template.xls"
Dim opts As New HTMLLoadOptions(LoadFormat.Html)
Dim workbook As New Workbook(filePath, opts)
workbook.Save(filePath & Convert.ToString(".out.xls"))

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

but I get always the same error message: Input string was not in a correct format

The template is the same...

Attached there is my sample project.

Thank you.

It's working now.

I had to add

System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US")

Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that you were able to sort out this issue by changing the culture to US. Let us know if you encounter any other issue, we will be glad to look into it and help you further.