Rows delete from excel

Hi

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

how to design this logic

Thanks in advance
Likitha

Hi @vinjam_likitha

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.

Hope this helps,
Best Regards.

Hi @vinjam_likitha

Try this linq query

(From d In Data1.AsEnumerable Where Data2.AsEnumerable.Any(Function (r) d(0). toString.contains(r(0).tostring)) Select d).CopyToDataTable

Regards,

Hi

I tried above linq query but i am not getting the filter data

Can you please recheck it

Thanks

Hi @vinjam_likitha

It is working for mine
Can you show your code

@vinjam_likitha

Please find below xaml for your reference

Electricity Task_Excel.zip (498.1 KB)

@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

thanks

@vinjam_likitha

Use Filter Data Table activity
image

Hello @vinjam_likitha

Please check whether the below video can help you to solve the issue.

Thanks

@vinjam_likitha

If you find the solution for your issue. Mark as solution to close the loop and others who might have this issue can helped.

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