Compare two excel files that has key more than one column

Hi RPA Team,
i am Zonda, please kindly to help my case.

I have two excel, first excel is master user and second excel is download data.
I need to compare both files use key name,department and title.

if data from download data cannot find in master user, it will insert new row in master user.
status will be active and insert current date.

if data from master user cannot find in download data, it will changing status in master user become inactive and insert current date.

i attach file download data sample, master user before and after update.

DownloadData.xlsx (24.0 KB) MasterRPAUserAfterUpdate.xlsx (14.6 KB) MasterRPAUserBeforeUpdate.xlsx (13.4 KB)

Hi ,

1)Use 2 different excel application scope activities and read ranges to read master Data and Download Data
So the output will be ex: MasterDT , DownloadDT
Now use 2 Add data column activities
Give column names ex: Status , Date and Datatable as MasterDT

Now use for each row of DownloadDT

Inside body of for each row

Use 3 get row item activities to take output of Name,Department and Title column values
Ex: the output variables for above 3 are
FirstName , Dept , TitleName

Now create a Datarow Array variable ex: DR1
Use assign activity
DR1 =“[Name] = '”+FirstName+“’ AND [Department] = '”+Dept+'" AND [Title] = ‘"+TitleName+’")

Now use a if condition to check any row is available in the Master Table
DR1.count >0

Dont put anything
Use add data row activity
In the Array row property give value as Row.ItemArray
Now use assign activity to write ‘Active’ status to 'Status’column
MasterDT.rows(DownloadDT.rows.index(row))(“status”) = “Active”

You can do the same to insert current date


MasterDT.rows(DownloadDT.rows.index(row))(“Date”) = Now.Datetime.Toshortdatestring

hi @vinay_reddy,

thank you reply my case.

I am already create program following your step,
but unfortunately, it doesn’t work for me.
please kindly help me again.

main file is attached
Main.xaml (19.3 KB)