Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem:: SSIS: Excel Destination. Mapping columns dynamically Expand / Collapse
Author
Message
Posted Monday, November 08, 2010 2:51 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 22, 2012 1:18 PM
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.

Post #1017043
Posted Monday, November 08, 2010 6:21 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, March 15, 2014 4:31 AM
Points: 2,808, Visits: 7,173
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.
Post #1017135
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse