Merge excel files from an array of string

Hi experts, I am using for each item in an array of excel files to get the items, but the issue is how to merge all the excel files from the array as a single excel file.Please any idea.Cheers!

Hi @RPA-botDev,

Use for each activity to loop the array of excel files
Inside the for each activity use read range activity to read the excel file.
From the second accerence onwards use merge datatable activity to merge the datatable.

Finally use write range activity to write the data into separate excel file.
Note: make sure all the datatable structure must be same.

Regards,
Arivu

Hi,

Another solution:

We can use AppendRange activity to merge table as the following, for example.

Regards,

Hi Youchi,I have tried this but it’s leaving lots of cell spaces in between the rows, is there what we are missing or a better alternative

Hi @RPA-botDev

I hope the below flow will help you.


It’s same as @arivu96 explained. If this works, please mark his post as solution.

Thank you.

Hi,

The following is sample workflow of the above image.
In my environment, there is no spaces.

Sample20211209-3.zip (21.3 KB)

So, first, can you check the above whether there is difference with yours.

Another possibility is datatable which is read by ReadRange activity contains blank rows.
We can remove blank row using Filter DataTable activity. This will help for this case.

Regards,

1 Like

Thanks,Yoichi, I removed spaces then it worked

1 Like

I have another issue to convert all positive numbers in x columnn to negative.What’s the best solution to this

Hi,

How about the following? (Added InvokeCode activity)

Sample20211209-3v2.zip (21.7 KB)

Regards,

1 Like

Thanks Yoichi

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.