I have used OLEDB to read from closed Excel 2002 and 2003 files (.xls). Now when I have to start reading from Excel 2010 files (.xlsx) the connection fails.
For a connection string I use:
Reading works ok if the .xlsx file is open but fails if the file is closed.
I receive the error when trying to open the connection:
I use and develop with Win7 and 64-bit Office but the users of the application may have 32-bit Office and even WinXP or Vista.
Is there some problem to use the Jet provider with Excel 2010 files?
For a connection string I use:
VB.NET:
sConnectionString ="provider=Microsoft.Jet.OLEDB.4.0; data source='" & sSourceFile & "'; Extended Properties=""Excel 8.0; IMEX=1; HDR=No;"""
Reading works ok if the .xlsx file is open but fails if the file is closed.
I receive the error when trying to open the connection:
VB.NET:
Dim objConn As New OleDbConnection(sConnectionString)
objConn.Open()
I use and develop with Win7 and 64-bit Office but the users of the application may have 32-bit Office and even WinXP or Vista.
Is there some problem to use the Jet provider with Excel 2010 files?