→ Let’s say the datatable Variable names are DT1 is Table1, DT2 is Table2, DT3 is Table3 and Output_DT is Output table.
→ Use the assign activity and give the below expression,
- Assign -> Output_dt = (From A In DT1.AsEnumerable
Join B In DT2.AsEnumerable
On (A("Column name of DT1").ToString) Equals (B("Column name of DT2").toString)
Select DT1.Clone.Rows.Add(A.ItemArray)
).CopyToDataTable()
→ Then use the another assign activity and use the below expression again,
- Assign -> Output_DT = (From X In DT1.AsEnumerable
Join Y In DT3.AsEnumerable
On (X("Column name of DT1").ToString) Equals (Y("Column name of DT3").toString)
Select Output_DT.Rows.Add(X.ItemArray)
).CopyToDataTable()
→ Then the compared result data is stored in the Output_DT, Use the write range workbook activity to write the Output_DT to the Excel.
Note: Change the Column names in the LINQ Expression.
Hie @MichaelB2442 use this linq query to compare the data in the excel sheets
(
From row In dtinput
From row2 In dtinput2
Where CInt(row(“No”)) = CInt(row2(“No”)) And row.item(“Name”).tostring = row2.item(“Name”).tostring
Select row
).copytodatatable
modify the column name with your column name or else for more column name
cheers Happy Automation