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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Excel to SQL import with DTS

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2005-06-25 : 11:14:50
I know how to create a package to extract data from an excel spreadsheet and import to a SQL table, manually.

However I have an excel filed called Main.xls, which exists in multiple folders under a Master Job Folder.

eg. JOBS
>>>>>>>>>>1009
>>>>>>>>>>1010
>>>>>>>>>>2356
etc

I want to be able to loop through all the subfolders and extract the data from the same sheet on the Main.xls file. I know how to set up the loop using the FSO, but am not sure how to complete the rest of the procedure.

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2005-06-25 : 14:58:43
There's a good tutorial on SQLDTS.com. Here's the link:
http://www.sqldts.com/?246

Alternatively, you could create a package containing nothing but the datapump and a preceding dynamic properties task setting the Excel connection source from a global variable, and call this from a parent package. You'd need to do this inside your FSO Loop, passing the Excel connection details in each time.

Mark
Go to Top of Page
   

- Advertisement -