Comparison of columns between two excel file using For Each row activity

@krishnan
use this Query

(From p in dt1.AsEnumerable
where ( From q in dt2.As Enumerable()
where (Convert.ToString(q.Item("column1)).Substring(2,8)).Equals((Convert.ToString(p.Item(“Column1”)))
Select q).ToArray.Count>0
Select p).ToArray.Count

It will give you the matched rows count of dt1 and if you want unmatched rows use dt1.Rows.Count-Count of matched rows

Regards
Mahesh

2 Likes