How to filter with some values in a column

Read the Data:

Use Excel Application Scope and Read Range to read your data into DataTables (e.g., dtSource(Sheet1) for the main sheet and dtFilter(Sheet2) for the sheet containing the 	values you want to filter by).

Create a List of Values:

You can create a list of values from the dtFilter DataTable. This will be the criteria for filtering.

LINQ Query:

Use an Assign activity to perform the LINQ query, checking if the current row's value exists in the list.


Dim filterValues As List(Of String) = dtFilter.AsEnumerable().Select(Function(row) row.Field(Of String)("FilterColumnName")).ToList()

’ Filter dtSource based on the list of filter values
Dim filteredData As DataTable = (From row In dtSource.AsEnumerable()
Where filterValues.Contains(row.Field(Of String)(“ColumnName”))
Select row).CopyToDataTable()