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.
Author |
Topic |
tsvenumadhav
Starting Member
5 Posts |
Posted - 2005-12-21 : 07:36:03
|
hi MadhivananI have the excel file called test.xls. it contains data likeid name age sex111 xxx 20 f222 yyyy 30 m333 zzzz 40 fi 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 errorOLE 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-21 : 07:44:41
|
Hi,Just in case this question was meant for everybody and not Madhivanan exclusively Is the sheet where the data is on the excel spreadsheet Called 'Sheet1' or is it maybe called something else?Duane. "It's a thankless job, but I've got a lot of Karma to burn off." |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-21 : 08:08:44
|
You need to replace 'Sheet1$' by the actual sheet name of the file MadhivananFailing to plan is Planning to fail |
 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-12-21 : 08:41:41
|
quote: Originally posted by tsvenumadhav hi Madhivanan
quote: Originally posted by ditch Hi,Just in case this question was meant for everybody and not Madhivanan exclusively
if its for Madhivanan, then post it here https://www.madhivanan.com/forums/ |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-21 : 09:00:48
|
quote: if its for Madhivanan, then post it here https://www.madhivanan.com/forums/
MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|