Compare 2 excel columns if match send the file with outlook as an attachment

Halo, i have a question about automate sending email.

Folder Data




data file
config file

If Column “Code” in Excel A Contains value in Column “suppcode” in Excel B
Then Send the file to email address in Excel B
With the config file for Body message

I have tried For each row for reading the file it works and able to send, but it continue to read the next row so if i have only 1 row it return blank (not send), this is my flow until If Condition:
Send Each File Loop Dummy.xaml (19.9 KB)

And this is the file:
TestConfig.xlsx (8.9 KB)
TestDataList.xlsx (8.8 KB)
Elwin_T034.xls (27.5 KB)
Zul_5624.xls (27.5 KB)
Zulfikar_5062.xls (27.5 KB)

So the question is:

  1. How to match by column in If Condition then send email
  2. How to send the file as an attachment if both column value match?

Thanks Before

Hello,

According to your requirement you need to use two loops.

First loop for get one excel file.
Second loop for iterator First excel data into loop.

inside you need to use filter data table pass your second excel data table output as input in filter data table and also column name which you are comparing and value. create output variable of filter data table.

then use if conditon filterdatatableoutput.rows.cout>0 then
whatever your requirement you will do.

@pawanrajpurohit how to get one excel file and do second loop? i’ve done the loop for get the excel files in the folder and read sheet1 did you mean like this?

sorry im newb in programming cant fully understand what you said

Give me your excel file demo So i will share workflow

@pawanrajpurohit i have shared in the post above all the data and config there is 5 .xlsx file, thankss