Merge 2 tables that are in the same excel sheet

Hey, please I need help.
I have 2 tables that are in the same excel sheet and I want to merge them. Any advice?

Hi,

If both the tables are having the same columns then you can read the tables as DataTable and then you can use Merge DataTable activity to merge both the tables.

Hello! Welcome to community!

Follow the below steps to get it done

  1. Take one Get Table range activity Provide the following details->Path of the file->TableName1->Sheet->Output
  2. Read the excel output as ->dt_Out
  3. Take one Get Table range activity Provide the following details->Path of the file->TableName2->Sheet->Output
  4. Read the excel output as ->dt_Out2
  5. Take one merge data table and pass the dt_Out1 and dt_Out2

Regards,
NaNi

@mayowa.mike-adeogun ,If them have same columns name,you can Read Range output to datatable,two sheet should output two datatable.And then use Merge Datatable to merge them.

Should I build a new DataTable with the columns and then read the tables from the excel file to that new DataTable?

Hi @mayowa.mike-adeogun,

You can directly read the Excel using read range activity with “Add Headers” options then the output Datatable will have all the columns that are in the tables.

Regards,
Rajeswari

Thank you, it worked

1 Like

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