Merge two excel sheets from different excel files using sheet name

Hello Everyone,

I want to merge two different excel file sheets like “File 1 : Sheet1 & File 2 : Sheet1”, “File 1 : Sheet2 & File 2: Sheet2”…using Uipath activities. Can anyone please help me to resolve this problem?

Hi,

This video might help you

Hey,
First you can use Read Range(For reading sheet 1 of File 1)-DT1
Then you can use Read Range(For reading sheet 1 of File 2)-DT2
You can use Merge Data Table ACtivity- In Destination you can keep DT1
and in source You can keep DT2


Thanks,
Rounak

But I have multiple sheets in both file.

Then You can loop the sheets and Append Range Activity you can use so it will append the data sheet by sheet

Thanks

Hi,

Try this workflow and modify it by adding read range for each sheet and add data row to result datatable
Main.xaml (11.5 KB)

Hi,

Follow this worflow
MergeDataTable Scenario.xaml (9.6 KB)

Thanks,

Hey,
if you got expected Output.
Please accept the solution.

Thanks,
Rounak

How can I extract one sheet from multiple sheets?

Do you have Name of the sheet then you can directly provide or if you don’t have then you can use get Workbook sheets activity . I have provided the workflow Sample.
Please check it will help you.

Thanks,
Rounak

By using get workbook sheets activity I got all the sheets but I want only one sheet from them.

then you can use break activity after getting one sheet

Thanks

Can you show me how to use Break activity?

Please follow this workflow
MergeDataTable Scenario.xaml (10.3 KB)
Thanks
Rounak,

Are you getting Expected Output??

One more question: How to append data by sheet name?

you can use Append Range Activity

image

I know but How can I append data by sheet name for example: File 1: Sheet 1 & File 2: Sheet 1.
I want to append file 2: Sheet 1 data into File 1: Sheet 1.

please Follow this
image
Thanks

Hi,

Following this template workflow and provide the sheet and excel file name you will the required output