Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error while importing multiple sheets of same excel into one table using ssis.


Error while importing multiple sheets of same excel into one table using ssis.

Author
Message
vsp.santu
vsp.santu
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 28
Hi,

I am importing multiple sheets of same excel into one table using ssis.

I am following below flow.

Data flow task->Excel Source->Look up->OLE DB Destination.

I have created a variable(User::Sheet123).

Now, in Excel Source Editor, I am using variable name(User::Sheet123) in Data access mode(Table name or view name variable).

Now the problem is, if i click on Preview, i am getting below error

Index and length must refer to a location within the string. Parameter name: length(mscorlib).

And there is no spaces in sheet names.
My sheet names are
Sheet1, Sheet2.

Excel - 2007 and SQL Server - 2008

Please help me.
vsp.santu
vsp.santu
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 28
I tried using foreach loop. But package is not successfully completed after debug the package. And there is no errors.

Where is the problem?
Attachments
1.png (7 views, 177.00 KB)
2.png (5 views, 162.00 KB)
3.png (4 views, 165.00 KB)
kumar1pr
kumar1pr
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 147
Can you provide some more information on this SSIS package, you are working on. Some of us can try to replicate it on our end.

Question: Is you different sheets in excel has same structure or its different. I can think of something like header table and detail table structure.
Vikash Kumar Singh
Vikash Kumar Singh
SSC Journeyman
SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)

Group: General Forum Members
Points: 81 Visits: 243
You can find a working example in this post.

SSIS: How to loop through Multiple Excel sheets and load them into a SQL Table?


Vikash Kumar Singh || www.singhvikash.in
kumar1pr
kumar1pr
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 147
Great example. I will definitely try to work your example tonite. Thanks for sharing it Vikas.
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