Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 IColumnsInfo::GetColumnsInfo returned 0x80004005:

Author  Topic 

tsvenumadhav
Starting Member

5 Posts

Posted - 2005-12-22 : 01:55:01
I have the excel file called test.xls. it contains data in "sheet1" like

id name age sex
111 xxx 20 f
222 yyyy 30 m
333 zzzz 40 f

i have sql server table called testexcel with same coloums.


my query is

Insert into testexcel Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')



when i run the above query in the query analyzar i am getting the following error

OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IColumnsInfo::GetColumnsInfo returned 0x80004005: ].



what's the wrong with my query...


plese give me help very urgent....

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2005-12-22 : 02:00:31
Hi There,
You posted this query yesterday.

and myself and Madhivanan both suggested that your sheet where the data is stored in the excel spreadsheet is not called 'Sheet1' - your query is trying to query from Sheet1.

You should either rename the worksheet (the bottom left corner of the excel sheet) to Sheet1 or change 'Sheet1$' in your query to whatever it is called on the spreadsheet.

Does this make sense?


Duane.
"It's a thankless job, but I've got a lot of Karma to burn off."
Go to Top of Page
   

- Advertisement -