Click here to Skip to main content
15,939,853 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I am using this syntax to read my excel file into SQL Server Management Studio 2008


SELECT * 
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
                'Excel 8.0;Database=C:\proj\test.xls',
                'SELECT * FROM [Sheet1$]')



But it throws error

The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.


I am suspecting JET OLEDB is not installed on my Windows XP. Although I do see the MsJet40.dll dll in System32 folder

When I look in Control Panel -> Adminstrators tools -> ODBC Admin, I do not see OLE DB in the drivers list. Could this a problem. If yes can someone guide me how to install it.

I went to http://support.microsoft.com/kb/239114[^] but after installation, it says I already have the latest updates. Can someone help.
Posted
Updated 20-Apr-12 2:57am
v4

1 solution

 
Share this answer
 
Comments
sharp_k 20-Apr-12 10:54am    
Awesome. Great help. I did follow this before, apparently the default name it chooses for destination table is wrong. This tutorial walks you step by step. Thanks
kimberly wind 20-Apr-12 11:02am    
Okie enjoy :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900