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


Problem:: SSIS: Excel Destination. Mapping columns dynamically


Problem:: SSIS: Excel Destination. Mapping columns dynamically

Author
Message
cooldudedeepu
cooldudedeepu
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 36
Hi

My requirement is as follows:

I have multiple Excel sheets in a folder which are in same format.

I need only one Column(for Example Column D) in all excel sheets and need move the data into an Excel Sheet(Data from all the excel sheets should move into one excel sheet but into different columns).

Example:
We have three excel sheets in a folder(which are in same format).
Need to capture data in Column D of all these three excels.
Output should go into three different columns(Column A consists of first excel sheet data,Column B consists of second excel data..and so on..) of excel sheet.


I have used Foreach Loop Container to read the data from all the excel sheets in the folder.
But the data moves into only one column of the output excel sheet.

How can we move the data multiple columns of the output excel?


Do any one know about this? If i am missing any other details which are required let me know.
Thanks in Advance.
tmitchelar
tmitchelar
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 508
I'm editing my post. I just tried to do what you are doing in SSIS and I can't figure out a way to merge data without a common key of some sort.

So, the only way I can really think of to get it to work the way you want it to would be to stage the data in separate tables first and then extract the data from your staging tables and use the row number function to create a surrogate key so that you can join both data sets together and insert those columns one next to the other in your destination file.

Another option might be to extract the data from your excel files and use a script task to create a row number column on the fly and then merge join them together based on that row number column which is acting as your common key between the two sources.

You might have to adjust your join to a left outer or right outer if one of your sources has more or less rows than the other.

Kind of a goofy way to get the result you want, but there isn't much use in the data integration world for joining non-related data together.

Maybe someone else has a better option.
BI_NewBie
BI_NewBie
SSC Veteran
SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)SSC Veteran (200 reputation)

Group: General Forum Members
Points: 200 Visits: 157
Hi,

can u explain me how to export the data with dynamic column into some flat file..
Please

Thanks.
Deepika
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