I need to insert records from an Excel sheet into a temp table in SQL without using DTS. I have tried the following:
Select * into NelNet_tmp FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=B:\MIS\MIS\Extracts\NelNet\MIPRIV 1282005(2).xls;HDR=YES',
'SELECT * FROM [Report1]')
But get this error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Unspecified error]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].
Any ideas either on this error or another way to do this?
Select * into NelNet_tmp FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=B:\MIS\MIS\Extracts\NelNet\MIPRIV 1282005(2).xls;HDR=YES',
'SELECT * FROM [Report1]')
But get this error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Unspecified error]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].
Any ideas either on this error or another way to do this?