Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Feb 24, 2015 1:38 pm

I am evaluating Spire.XLS for NET. With the free version I do not have any problem (only the limitations of this version) but with the version 7.6.33 (or the hotfix 7.6.36) I get always the same error in the method SaveToHtml of the class WorkSheet:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll

Additional information: startIndex can not exceed the string length.


The error only occurs with *.xlsx files and not occurs with *.xls files. This is the code:

Dim Destino As String = "D:\Proyectos\TestSpireXls\Datos_TrimlocV1_ce.html"
Dim Origen As String = "D:\Proyectos\TestSpireXls\Datos_TrimlocV1_ce.xlsx"
Try
If IO.File.Exists(Origen) Then
Dim HojaAExportar As Worksheet
Dim LibroAExportar As New Workbook
LibroAExportar.LoadFromFile(Origen)
HojaAExportar = LibroAExportar.Worksheets(0)
HojaAExportar.SaveToHtml(Destino)
End If
Catch ex As Exception
MessageBox.Show("Error exportando a HTML: " & ex.Message())
End Try

lurodi
 
Posts: 1
Joined: Mon Feb 23, 2015 11:19 pm

Wed Feb 25, 2015 1:54 am

Hello lurodi,

Thanks for your inquiry.

To help us reproduce this problem, can you provide us the sample xlsx file?

Thank you.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.XLS