I am trying to import excel table into my sql database.
My excel file is on my local machine and I tried this code :
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=Q:\Documents and Settings\Administrator\My Documents\myfile.xls', 'SELECT * FROM [QPrintPolicyRenew$]')
I keep getting this error :
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Can anyone help ??
asked Feb 28 '10 at 10:24 AM in Default
The first line of the EXCEL file should have column informations Refer this for more informations http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
answered Mar 03 '10 at 04:23 AM