Hannah McDade
Hannah McDade

Reputation: 87

SSIS Dynamic population of Excel File Name

I've written an SSIS package to upload data from an Excel source to a OLE DB Destination - however when I wish to use a ForeachLoop container in order to load data from multiple excel files I am getting an error. I have followed the tutorial contained in the link below:

https://msdn.microsoft.com/en-us/library/ms345182.aspx

All of the configurations are correct apart from the Variable strFileName which needs to be dynamically populated. As can be seen from the screen shot below my variable remains blank:

enter image description here

I am unsure how to do this. Is there an expression or function that can be used to dynamically populate this variable?

Upvotes: 1

Views: 1338

Answers (1)

Huojian
Huojian

Reputation: 198

If you want stored fileName dynamically for each one in your folder use the Variable Mappings in your loop like this

Mapping

And for your loop:

ForEach

Note that your variable is always blank because the field is only updated when you enter in your loop.

Upvotes: 1

Related Questions