How to copy two different Data Table columns based on headers

I had Two Different Data Tables and i need column 1,2,3 from table1 and 4,5,6 from table2 and paste it in table 3 which is my output.(Table 1 and Table2 are entirely different)

Hey could you share the excel sheets you are using

May i know if the column 1,2,3 in dt_1 is also present in dt_2?

Hi @mettudp077
Welcome to Community!!

  1. Use the “Read Range” activity to read data from Table 1 into a DataTable variable.
  2. Use the “Read Range” activity again to read data from Table 2 into another DataTable variable.
  3. Use the “Build Data Table” activity to create Table 3 with columns 1, 2, 3, 4, 5, and 6.
  4. Use a “For Each Row” activity to iterate through the rows of either Table 1 or Table 2.
  5. Inside the loop, use the “Add Data Row” activity to add a new row to Table 3. You can use the “ArrayRow” property to specify the values you want to copy from the current row of Table 1 and Table 2 into the corresponding columns of Table 3.

No These are different. For example Table is Product Details Table2 Is Employee Details we had table3 with columns consists of both these details we need to paste these column values to 3rd table

use join data Table activity

Regards

No they are not equal.

1.dt1.asenumerable.take(3).copytodatatable
2.dt2.defaultview.totable(false,“column4”,“column5”,“Column6”)
3.join datatable activty pass the dt1 and dt2

use full join type in join datatable activity

@mettudp077 Can you try it with using merge data table activity