¤ Thanks Paul
¤
¤ I'm getting an exception error though that I cannot fix.
¤
¤ Do you mind checking my code?
¤
¤ Dim excelConnection As System.Data.OleDb.OleDbConnection = New
¤ System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=c:/test.xls;Extended Properties=Excel 8.0;")
¤ excelConnection.Open()
¤
¤ Dim excelCommand As New System.Data.oledb.OleDbCommand("INSERT
¤ INTO [OBDC; Driver={SQL
¤ Server};Server=(local);Database=FullDate;Trusted_Connection=yes].[Population]
¤ SELECT * FROM [Population$];", excelConnection)
¤
¤ 'Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("SELECT
¤ INTO [ODBC;Driver={SQL
¤ Server};Server=(local);Database=FullDate;Trusted_Connection=yes].[Population] FROM [Population$];", excelConnection)
¤
¤ excelCommand.ExecuteNonQuery()
¤ excelConnection.Close()
¤
¤ The exception error is:
¤
¤ Could not find installable ISAM
¤
I don't see a problem with the connection string for Excel. On what line of code does the error
occur?
I would also check the following Registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
This entry should exist and the win32 entry should point to the following file:
C:\WINNT\System32\msexcl40.dll
Make certain that the above file exists.
If the Registry entry is incorrect or the file is missing then you'll need to install the Jet
database engine components:
http://support.microsoft.com/default.aspx?scid=kb;en-us;239114
Paul
~~~~
Microsoft MVP (Visual Basic)