SSIS - Reading multiple sheets from Excel files into SQL DB

In SSIS:
I have several excel files containing multiple sheets.
I need to read the 12 sheets from each file named by each month (Jan - Dec).
The files also contains other sheets by I'm only interested in the months.
I have created a SQL DB containing a table for each month.
I have also created another table which contains the name of each months where a script task reads all the records from.
After the script task I have a for each loop which contains the data flow. I have attached some screens shots.
I cannot get the excel source to read from the object variable containing the name of the month.
I need help to configure this.
Thanks.
Control-Flow.JPG
Data-Flow.JPG
Connection-Managers.JPG
ColoplastAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ColoplastAuthor Commented:
Here are the images:
Control flowData-Flow.JPGConnection-Managers.JPG
Jim HornMicrosoft SQL Server Data DudeCommented:
Any way you can avoid this altogether?  There are multiple reasons I would not choose to go down this road..

>I have several excel files containing multiple sheets.
>I need to read the 12 sheets from each file named by each month (Jan - Dec).
Excel is great for users entering data however they wish.  Similary, Excel is terrible as a data source because users can enter data however they wish, causing a normalized data load to fail.

>I have created a SQL DB containing a table for each month.
Why?  Assuming the schema of the Jan-Dec tabs are the same, why would you import into 12 separate tables, as opposed to a single table with an added column for month?

 >I cannot get the excel source to read from the object variable containing the name of the month.
A vastly better idea would be to write a SELECT query that contains months, then use that in the container to loop.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ColoplastAuthor Commented:
Source has to be excel, they are typing data into a template and they are trained typing the data correctly :-)
Importing into 12 different even though the schema is the same is because then our BI department wouldn't need to change their logic.
I don't think I understand your last comment with the SELECT query.

If you have suggestion for a better solution, maybe you could create in SSIS and drop me some screen shots?

Thanks
ColoplastAuthor Commented:
Hi Jim,
Could you please give an example of your comment: "A vastly better idea would be to write a SELECT query that contains months, then use that in the container to loop."
Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.