Filter datatable by list in excel

hi all, i need some help with filtering a datatable with a list of strings


Left is the table to be filtered, and right is the list of strings to filter by.

The end result should be a list containing only the strings on the right (C1, C3, C6). Both the right and left lists are dynamic.

Any help will be appreciated! thks

you can do it with essential activities like

  • for each -iterating over the list
  • filter datatable
  • for each row for iterating the search results
  • add to collection for adding it to the list

also it can be done with linq, DatasetExtensions
YourDataTableVar.AsEnumerable.Select(function ( r ) r(ColumnnameOrIndex).toString.trim).Intersect(YourSearchStringList).toList

Used within an assign activity will return list of strings
Removing of duplicates can be done with additional use of Distinct()


ok thanks for your help!

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