Filtering Data Table without looping

I have excel which contains 10000 records, Want to filter whether value exist in the data table or not. I am using for each row to check value but it makes my automation slow. Is there any way to filter data table without loop?

Thanks in advance


Use below linq query to filter DataTable without loop.

yourDT.AsEnumerable().Any(Function(x) x("DtColumn").ToString = DesiredValue)
It will return True if any of the rows match the predicate.

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