SQL Clone
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
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 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.
steveb.
steveb.
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23220 Visits: 7195
The way I would do this would be to load all the data from the three sheets into a sql database table with a column for the data and another column to identify which sheets they came from,

Then i would create a query to select from that table that would select a column for each sheet based upon the sheet Id , and then use this as a source to populate the destination spreadsheet.
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