SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Issue looping through multiple excel files with different sheet names


Issue looping through multiple excel files with different sheet names

Author
Message
Harjiv Kochhar
Harjiv Kochhar
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 154
I have an several similar excel files and all of them have just one sheet/tab under them with month names. Looping through multiple excel files and loading them into tables was working fine earlier using the For Each Loop Container until I started receiving files with different sheet names other than the default "Sheet1".
Kindly suggest step by step instructions for implementing this. I have tried using the Script task but the package would fail while looping through the files.

Thanks
davemcminoway
davemcminoway
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 104
Have you had any response to your question offline? I am attempting to do the same thing. Thanks!
swaroop.sahoo
swaroop.sahoo
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 267
Hi,

I don't know what error you are getting. I just tried your scenario by putting 2 excel files in the source folder with data in Sheet1 and Sheet2 respectively. It is working perfectly fine for me.

May be SSIS engine searches for the right sheet to use. I am using SSIS 2008 R2.


Thanks,
Swaroop
Attachments
SSISTest.zip (17 views, 22.00 KB)
Mr. Holio
Mr. Holio
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 2559
Hi,

Would you mind sharing your package so that one could have a look who is interested in the above topic?

__________________________
Allzu viel ist ungesund...
swaroop.sahoo
swaroop.sahoo
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 267
I am not sure how to upload the package and the excel file to this thread. would you mind sharing your email ID!!
Mr. Holio
Mr. Holio
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 2559
swaroop.sahoo (10/26/2011)
I am not sure how to upload the package and the excel file to this thread. would you mind sharing your email ID!!


You can ZIP your files and attach it to your post. Thanks.

__________________________
Allzu viel ist ungesund...
swaroop.sahoo
swaroop.sahoo
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 267
Here you go ..
Attachments
SSISTest.zip (25 views, 22.00 KB)
Mr. Holio
Mr. Holio
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 2559
swaroop.sahoo (10/26/2011)
Here you go ..


Assuming the original poster meant to load the stuff into a SQL server table rather than into another excel file?

__________________________
Allzu viel ist ungesund...
swaroop.sahoo
swaroop.sahoo
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 267
It is working with DB tables as well.
Let's wait for the original poster to respond.....
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search