Help! I'm getting an OleDbException: No error message available, result code: E_FAIL(0x80004005), trying to open an oleDBConnection to an Excel file.
Posted on 2006-05-04
Dim oledbexcelConnection As OleDbConnection = New OleDbConnection()
Dim szconnectstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & szfilename & ";" & _
"Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
I've tried many different permutations, but still I get the above error, or 'ISAM not found' or something. This is a connection string that worked fine in ASP, but is now impossible to get working in .NET ADO 2.0.
szfilename = "c:\websites\excel_files\myexcelfile.xls"
I'm desperate. 500 pts for whomever can get this so the connection opens and retrieves the rows in the 'new_range' range name.