I have 2 excels with 300 records in one excel(i.e Excel 1) and 80 records in another excel(i.e. Excel 2) which outputs are 2 datatables
RequestID in “Excel 1” datatable and RecordID in another “Excel2” datatable values we need to compare if values are same then those records should be present in Excel1 input file remaining records should get deleted
Please try using the Join Data Table activity for this. You need to select the Inner Join option in order to retain the common data between two data tables.
@lrtetala its working for me after doing minor changes
(From d In dt2.AsEnumerable Where dt1.AsEnumerable.Any(Function (r) d(“Record Id”).toString.trim.Equals(r(“RequestID”).tostring.Trim)) Select d).CopyToDataTable
After filtering my output excel file contains empty rows how to delete them