Merge Excels

I have 1 folder contains 5 excel files. Each excel contains data in two sheets let's say sheet 1 and sheet 2 .
how can i add all excel file's sheet 1 data in to new excel file Sheet 1 and all excel files's sheet 2 data into new excel file sheet 2 .

can any one please provide solution ?

i am stucked in this stage. if any one suggest the solution then it will be helpful to me.
 

LeoLugo

Member
I would try the following:
1.Loop through each file "sheet1"
2.When looping get the worksheet as a collection output should be [Collection1]
3.Merge [Collection1] with [Collection1Final]
4.When you are done looping through the files [Collection1Final] should be all the values from "sheet1" combined into one collection. So just create a new file and Write [Collection1Final] to the new excel file "sheet1"
Repeat the same process for "sheet2". You will have to figure out the details but this is the approach I would try first. This might not be the most efficient way of doing it but this is just my 2 cents.
 
Top