Posted 18 February 2018, 11:26 am EST
I am converting from Spread7.com to Spread8.com. I loaded the Trial version and my application was automatically upgrated to Spread 8. However, I could not load an Excel 2007 (.xlsx) file. named “Test File - 02-18-18.xlsx” To see if it was a problem with my application, I created another test application containing only 2 controls – fpSpread1 and Command1 with the following code within the Command1 button necessary to load a file named “Test File - 02-18-18.xlsx” with the same results I received in my application.
[b]Private Sub Command1_Click()
Dim ExcelTest As IsExcel2007FileConstants Dim F As Boolean ExcelTest = fpSpread1.IsExcel2007File("C:\Test File - 02-18-18.xlsx") MsgBox Str(ExcelTest) If ExcelTest <> 1 Then MsgBox "Warning - C:\Test File - 02-18-18.xlsx may not be in a valid Excel format" End If F = fpSpread1.OpenExcel2007File("C:\Test File - 02-18-18.xlsx", "", -1, "", "")
End Sub[/b]
The variable ExcelTest returned a 0 which means that the file was not in a valid Excel format when in fact, it was created by Excel 2007 and therefore a valid .xlsx file. I also tried to dimension the variable ExcelTest as an integer and got the same results.
The code preceded to load the file using the OpenExcel2007File method, and I received another error message – Run-time error ‘13’ Type mismatch which usually means an undimensioned variable, yet F was dimensioned as Boolean in accordance with Spread8 documentation.
Perhaps you can guide me as to where I am going wrong.