I have two excel files. In first excel i have a sample list of companies which i want to check in the second excel file. If row matches any string in second excel file keep that row otherwise remove.
Any help would be appreciated.
Here is my code: File_Check.xaml (8.1 KB)
After 2 read range, let’s say,
Dt1 —> is your main datatable.
Dt2 —> is datatable where, you search for matching value.
use following linq code in assign activity
Thank you for the solution. If my column don’t have any name so can i use “Column0” or not?
I tried your solution but i am not getting the required result. Can you please check my code and excel files and send me the code after your update if required.
@samirSequence1.zip (108.5 KB)
please find the code and excel files with output. I am getting all the results in the output but i want only the matched ones
@samir sorry i was not able to understand the example you shared. I need to read from excel files not to build it. And if any value does not matched then it should not write those value but now it is writing all the values. Can you please check my code i have shared above also attached hereSequence1.zip (108.5 KB) “Sequence1.zip” and advise.
After read range its gonna end up in datatable only.
Dt1- Dt2 -
Output —>
here you can see that value with LLC & INC are there in output because its there in Dt2, but Compy 123, Pvt LMT doesn’t match the condition, why, its because there’s lmt which doesn’t match LMT
getting…??
I have checked your files buddy there’s value inc. in one file and INC. in another… so it’s not gonna match…
If you provide your expected output file then it’ll be easy for everyone here to suggest.
@zeshanm9
I can confirm some issues as I prototyped the same from your older, forked, duplicated Topic ( Compare two Excel Sheets using Linq )
and got also some rows into the result which should be blocked. The initial analysis did not find out the issue. I started to remove empty columns for the filtering, but didn’t solved it. Some unkown, hidden parts are doing a filter confusion.