How to update existing records in a excel file based on another excel file

Hi Team,

I have situation where I have 2 Excel Files like this (One is named as Main and Other is recurring )

Now on Say 11th July (Yesterday) The Main file looked like this

image

And Now there is this file called recurring which gets updated on a daily basis say it got updated today (12th July) and which looks like this :

image

Now here as you can see the the Record DEF is not existing in the main file because it came in the recurring file today. So it will be directly added to the main file as it is

But for the Record ABC it is already existing in the main file but the only diference is the Status column which has changed as per the recurring File.

So what I need to basically do is Add the records which are not present in the Main File as it is from the Recurring File and Update the record as per the recurring file for already existing records in the main file so that

My Final output which is the Main File at 12th July which is today would look something like this :

image

Any Suggesstions ? :slight_smile:

And also Thank you for taking out time to read this if you reached till here.

@Ishan_Shelke
Hi,

Read the two excels and store it in datatable
Take for each row in datatable and store the currentrow data in a variable. inside take another for each .
Take if condition check the where it finds the two excel data are matching by using a unique colum in the two excels, and then check the status if the status is not matching update the status in the main datatable.
in the else block use add datarow activity outside the for each loop use append datatable .

I hope this will help you.

Hi @Ishan_Shelke

Please check the attached xaml for the solution

sample.xaml (27.1 KB)

Regards

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