Click here to Skip to main content
16,004,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
insert into OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\Tracking.xls;;HDR=YES', 'SELECT * FROM [Sheet1$]') select * from TDR




am using this query to export .

But getting error message
SQL
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" 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.".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Posted
Comments
RedDk 13-Mar-13 13:48pm    
Is it possible that OLE DB Providers that run in single-threaded apartment mode cannot be used for distributed queries?

1 solution

Hi,

May be your Source Excel Sheet already Opened or Path of the Excel Sheet is not correct...

Check the links...

SQL Server 2008 - Import-Export Wizard [^]
Export to Excel[^]
SQL SERVER – 2005 – Export Data From SQL Server 2005 to Microsoft Excel Datasheet[^]

Regards,
GVPrabu
 
Share this answer
 
Comments
kimberly wind 13-Mar-13 5:13am    
Nope everything is correct . I don't want to export via wizard . thro query only wanna do
gvprabu 13-Mar-13 5:17am    
Yes,
In that link Sample Query also there.... check the links
Maciej Los 14-Mar-13 16:46pm    
+5 for links!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900