Vendor getting error when opening Aspose Excel generated workseet


#1

I’m using Aspose Excel for a specific purpose. My vendor requests our files and we write them with your product. He has given me the code that they use to pull in the Excel file. They are indicating that when they try to read the Aspose file it gives them an error that the column could not be found. Here is their code and my file is located at:

http://www.directdeals.com/aspose.xls

their code below here

it is written in-house vb6 app.
We are using ADO and Jet 4.0 provider. Connection string as follows:
conn.Open “Provider=Microsoft.Jet.OLEDB.4.0;” & “Data Source=” & FName & “;” & “Extended Properties=”“Excel 5.0;HDR=YES;IMEX=1;”""

opening sheet as adodb recordset
sTableName = "[Sheet1$]"
Set ss = New ADODB.Recordset
ss.Open sTableName, conn, adOpenStatic, adLockOptimistic

Please help me, I can’t figure this out. Here is the code I am using to write the file.


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

’ If you have purchased a Website, Webserver or Weboem License,
’ Create an Excel instance like this:
’ Dim licenseFile as String = MapPath(“License”) + “\Aspose.Excel.lic”;
’ Dim Excel as Excel = new Excel(licenseFile, this);

Dim licenseFile As String = “C:\inetpub\wwwroot\directdeals\bin\Aspose.Excel.lic”
Dim excel As Excel = New Excel(licenseFile, Me)

CreateProductsList(excel)

End Sub

Private Sub CreateProductsList(ByVal excel As Excel)

excel.Open(“C:\batchfiles\pricewatch.xls”)

Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings(“ConnectionStringGP”))
Dim myCommand As SqlDataAdapter = New SqlDataAdapter(“DD_Datafeed_PriceWatch_Individual”, myConnection)

Dim objDS As New DataSet
Dim objDT As New DataTable

myCommand.Fill(objDS)

objDT = objDS.Tables(0)

Dim sheet As Worksheet = excel.Worksheets(0)
sheet.Cells.ImportDataTable(objDT, False, 1, 0)
'sheet.Name = “Sheet1”
'FileFormatType.ExcelXP

'excel.Save(“AlphabeticalList.xls”, SaveType.OpenInBrowser, FileFormatType.Default, Me.Response)
excel.Save(“c:\datafeeds\pricewatch\pricewatch.xls”, FileFormatType.Excel95)

End Sub


#2

Hi,

Have you tried to save file as Excel97 or above format?

excel.Save(“c:\datafeeds\pricewatch\pricewatch.xls”, FileFormatType.Default)


#3

Yes we’ve tried all formats.

Eric


#4

Hi Eric,

Please try our latest hotfix. In previous version, some extra data is filled into result file. Though MS Excel can ignore it, I think your program cannot. Now it’s fixed.