How to filter an Excel file using the values in another Excel file?

Hello,

I have researched the community questions asked before and although some are in the same area, they do not ask about the exact problem I’m facing. Here is my question:

I have two files: “data table.xlsx” and “parameters.xlsx”

Within the “data table.xlsx” file, there are three rows with data, with the FIRST column being the key column. Within the “parameters.xlsx” file, I have only one column with some of the same values being the same as the FIRST column of “data table.xlsx”

What I would like to do is filter the “data table.xlsx” file so that I can output a new Excel file which contains ONLY the full rows where the FIRST column contained the values found within the “parameters.xlsx” file.

Here is the approach I have taken:

  1. Added both Excels into Data Tables within UiPath
  2. Created a nested “For Each” loop to see if I can filter the main DataTable by only the values found within the Parameters datatable.

I am having trouble with Step 2. I have included my original files (including “data table.xlsx” and “parameters.xlsx”) and I have also included my project XAML files as well.

Could you please take a look and offer some suggestions as to how I can solve my issue? I would really appreciate your help! Thank you so much.

For example, since the “parameters.xlsx” file only contains the values “A” and “C” , I would need my final output file to look like this:

“Column 1” “Column 2” “Column 3” (headers row)
A Bob Male
C Jill Female

data table.xlsx (7.8 KB)
parameters.xlsx (7.7 KB)
For Each Example.zip (4.9 KB)