Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Multiple Excel files into a single table Expand / Collapse
Author
Message
Posted Monday, October 27, 2008 7:48 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 1, 2008 11:53 AM
Points: 4, Visits: 19
I have several Excel files (7 to be exact) which represent slices of a composite Excel file so when I put all of them side-by-side, the original Excel is fully reconstructed. This means that except for the first column in each file which stores the key, the structure of each file is different.

How can I use SSIS to loop through these files and load each into its own table?

After the loop, I will probably execute a SQL Task to put all the slices back into a composite table.

Thank you.
Post #592573
Posted Monday, October 27, 2008 8:59 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 9:48 PM
Points: 2,925, Visits: 2,526
The "ForEach Loop" container is what you need to loop through the list of files. When you use this, the container gives you a variable which is the name of the file which you can use as an expression to set the file name for the Excel source for a dataflow. Have a look at topic "Foreach Loop Editor" in Books Online.


Post #592590
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse