July 3, 2012 at 12:33 am
Hey Everyone,
I m trying to import data from 3 excel files(.xlsx) into a single table in ssis pkg using data flow task inside--for each loop container(control task).
It ran good for one excel file but the data in other 2 files are not loading into the table.The package executed successfully though.
Can anyone help to loop other 2 excel files also...
🙂
Thanks,
Hemanth.
July 3, 2012 at 1:19 am
Hi hemanth T
It could be possible that your Excel data source has the Excel file name hard coded; are you dynamically updating it from the loop variable?
You may take a look at this topic: How to pass excel file name using a variable It explains how to pass excel file names to the transformation component.
Cheers
Hope this helps,
Rock from VbCity
July 10, 2012 at 4:36 am
Hey,
Thanks that's almost what i was expecting but when i followed the same i am getting the data in single excel file inserted into table multiple times i.e, if i have 3 excel files i got 3 times data of a first single file.
Can you help me out of this.
How i can increment the filepath in a folder.
--Thanks in advance
July 10, 2012 at 9:15 am
It seems you overlook step number 4; the variable @[User::FileName] is the one defined by the ForEach loop in the control flow, just make sure your that the Excel Source defines an expression on its ServerName property.
Cheers,
Hope this helps,
Rock from VbCity
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply