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
 General SQL Server Forums
 New to SQL Server Programming
 Export Data

Author  Topic 

sanjay5219
Posting Yak Master

240 Posts

Posted - 2010-01-26 : 14:25:21
Dear All,

I am using following query.
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT * FROM [SheetName$]') select * from Emp_master

and getting below 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: ].

sanjay5219
Posting Yak Master

240 Posts

Posted - 2010-01-26 : 14:27:59
By the way i am using Excel 2007
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-01-27 : 02:04:28
Does the file C:\testing.xls exist in Server?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sanjay5219
Posting Yak Master

240 Posts

Posted - 2010-01-27 : 09:16:08
No
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-01-27 : 09:25:46
quote:
Originally posted by sanjay5219

No


It should exist there. Otherwise use UNC path

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -