Comparing Two excel files

This should work, you just need to switch your datatable variables for 2nd case.

dtMissing = (From x In dt1.AsEnumerable() where Not (From a In dt1.AsEnumerable() Join b In dt2.AsEnumerable() On a(colname).ToString() Equals b(colname).ToString() select a).Contains(x) select x).CopyToDataTable()

2 Likes