Search for column value and merge data cells


I have two excel sheets where one has duplicate ids with 1 more column and the other has only unique ids with 1 extra column. I want to merge them by searching for those unique ids from the second datatable in the first datatable. I have uploaded a sample file for better understanding.merge.xlsx (9.8 KB)


@Dominic @ovi @arivu96


Hi @jamnanin

Refer this post.



Does anyone know how do i select rows from one table that are not available in the other table.



let us take you want to get the rows from dt1 which are not there in dt2

(From p in dt1.Select()
where (From q in dt2.Select() where string.Join(",",q.ItemArray).Equals(string.Join(",",p.ItemArray)) Select q).ToArray.Count<1
Select p).ToArray.CopyToDataTable()