Excel automation in two differenet sheets

trying to compare the two different sheets in two different excel files. But I wasn’t able to find the matched data. I tried using for each row data table and then using filter data table .Can someone help me to fix the issue ?

Hi @Suthari_RohithReddy

Provide much information about it what you want to compare in the two excel and after that what you want to do.

i want to compare the columns in the sheets and then after i want to write it down in a new column .

DT1.AsEnumerable().Where(Function(row) DT2.AsEnumerable().Where(function(r) r(“Name”).ToString.Equals(row(“Name”).ToString) and r(“Amt”).ToString.Equals(row(“Amt”).ToString) and r("RRN").ToString.Equals(row("RRN").ToString)).Any).CopyToDataTable

This is a sample query that compares the rows name,amt and rrn and returns the matched columns in dt1

Okay, Then use two read range workbooks to read the two excels and store it in two datatables like dt1 and dt2.

Use for each row in datatable activity to iterate for dt1 and insert another for each row in datatable activity to iterate dt2.
Inside second for each row in datatable use if condition to check the condition
Currentrow1(“Columnname”).toString.equals(Currentrow2(“Columnname”).toString)
In then block use the write cell workbook activity to update the column in the excel 1 or 2.

Hope it helps!!

i used those but its not writing in the sheet .

@Suthari_RohithReddy
I have updated the above reply, check it out.

i tried this way and also using filter data table as well but am not getting the output. Is it possible to connect in meet now ?
just look over the construction once

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