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 2008 Forums
 SSIS and Import/Export (2008)
 [Excel File Path] point to a specific sheet?

Author  Topic 

mayocraze
Starting Member

1 Post

Posted - 2011-04-10 : 12:31:23
I know this sounds very stupid...but i've been googling for one hour and still cant find an answer.

If my excel file have several tabs, and i only wanna export data to SQL server from a specific sheet(e.g. sheet3). In this case, what should be the format for my "Excel File Path" in SSIS? How should I write the path to point to the specific sheet?

rwatson
Starting Member

4 Posts

Posted - 2011-04-12 : 16:05:28
I usually import into a table in a query screen like so (this actually creates the table then imports the data):

SELECT * INTO SomeTable FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\SomeSpreadSheet.xls;Extended Properties=Excel 8.0')...[Sheet1$]

where Sheet1$ is the worksheet name in the spreadsheet, so maybe that syntax will work for you.

Ray Watson
Go to Top of Page
   

- Advertisement -