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 2005 Forums
 SSIS and Import/Export (2005)
 exporting data

Author  Topic 

js.reddy
Yak Posting Veteran

80 Posts

Posted - 2007-09-12 : 02:08:39

I am using sql server 2005

I want export data from Excel to new SQL Server table,

select *
into mytable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=c:\sample1.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')

But i am getting following error message

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)".


madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-12 : 02:35:28
As specified make sure that the sheet name is Sheet1. Also make sure the file path is server's path and not local system's

Madhivanan

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

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-12 : 22:56:40
If it's remote file, use unc name for file path.
Go to Top of Page
   

- Advertisement -