How to compare data in datatables and output a new one?

I have two datatables like

A Chennai
B Mumbai

and

A Mumbai
B Mumbai

The first one is last month’s data and the second one is current month data. I am splitting the current month data based on location so, since there is only Mumbai in current month, I will have an Excel file having both the records.

Now, I must get the transfer from and transfer to for all employees.

So, in Mumbai for A it’s transfer from Chennai I got this right, it’s working perfectly

For transfer to also it’s working fine (It must create a file in Chennai location with the Employee’s new location but, it’s creating the file in Mumbai location itself) What have I done wrong?

Kindly help!!!

Hi
if possible can i have a sample output that you require for these two datatabes based on the process

Cheers @cybzom

Just the output ,how you want???..

@Palaniyappan sir this is what I am trying to achieve:

Last month data:
image
Current month data:
image
I am splitting the current month’s data based on location so I have two files like

C:/Test/Chennai/Chennai.xlsx containing A’s data and C:/Test/Mumbai/Mumbai.xlsx containing B and C’s data (based on current location)

This step I got right :white_check_mark:

Now, I am running a for loop for each file and comparing it with the last month data to get the transfer from and transfer to details like

A is transfer from Mumbai and it should be created in Chennai folder as a new file and I got this right :white_check_mark:

A is transfer to Chennai (from Mumbai) and it should be created in Mumbai folder :x:

The output I need is

A | Chennai data in Mumbai folder as a new file named transfer to

I’m currently in transit I will share xaml file if required

@Manish540 please refer above :arrow_up:

Any updates on this sir @Palaniyappan?

Anyone has any solution for this one? @Palaniyappan @Manish540 pls sir i’m stuck in this part frm mrng