How to pass the excel connection string dynamically in the foreach loop container for Excel Source?
In the Foreach Loop Container, I have the variable set to the Expressions / Directory.
In the Excel Source, I have mapped the Excel Connection String with the same variable mentioned in the Foreach loop Container.
However, I am getting an error
This error is thrown by Connections collection when the specific connection element is not found
You can perform this in 3 steps:
- In the for each loop container, go to Variable Mappings and Map the result of the loop into a variable.
- On the Excel Connection Manager, Go to expressions, Set the value of
ExcelFilePathproperty expression to the variable you created in the for each loop.
- On the dataflow task Change the
Delay Validationproperty value to True.
For a detailed step-by-step tutorials, check the following links: