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
 Script Library
 Exporting data to Excel

Author  Topic 

sreeraj216
Starting Member

4 Posts

Posted - 2007-07-15 : 22:02:43
Hi,

I am Sree Raj. New to SQL Server.

I am trying to export data to excel and it is giving an error.
Here is the query and error:

INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\SQL Server\Emp_Personal_Data.xls;', 'SELECT * FROM [Sheet1$]')
SELECT * FROM Emp_Info

error is:
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)"

Can anybody please help me what is this error about & how to fix this.

Thanks in advance
Sree Raj

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-16 : 03:02:06
The path to the file is relative to the SQL Server you use, NOT the workstation you have.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -