Comparing two data tables

Hi @Aggi,
Will look into it tonight. I’m in office.

Thanks and regards,
Ananthu

1 Like

Hi @Aggi,
The problem with your test1 excel sheet is that it haven’t got any unique element to map across sheets for comparison.

In the attached workflow, I have used the row index as unique element and did the comparison. Kindly let me know if you face any issues.
AExample.xaml (34.9 KB)

Thanks and regards,
Ananthu

1 Like

Hi @Ananthu,
thank you for help. I understand now everything clear -)
Have a nice weekend.
Agata

1 Like

Have a great weekend!

Hi Ananthu,

I am stuck in a similar problem…

I have two data tables, one contains the names, another datatable contains another set of names, i just need to check if the name in dt1 is present in dt2.

can you please help me?EXCELanasys.xaml (35.2 KB)

Hi shreyaank,
Ya sure! I will send you the workflow by tomorrow…

Thanks and regards,
Ananthu

Hi @shreyaank,
I have verified your work flow. You have to initialize the variable i to 0. If you still have issues, kindly send me the excel sheet so that I could verify.

Thanks and regards,
Ananthu

_testsheet1.xlsx (12.1 KB)
testsheet2.xlsx (306.3 KB)

Hi Ananthu,

i have uploaded testsheet 1 and testsheet 2,

i want to check if the name frm sheet1_is present in sheet2. if it is present, it should display yes or else No

Hi Ananthu,

I have made the changes, still getting error. Please have a look.
EXCELanasys (1).xaml (37.0 KB)
image

Hi Ananthu,

I am stuck with a similar kind of challenge that you faced once as per this post and I still haven’t found any luck.

In my case, I have some expected dataset in an excel file and I need to extract similar type of data from a web portal into another tab of that excel file. Once done, I need to then compare the two data set to find out whether the Expected Values matches with the Actual Values or not. If not, I need to highlight the same in the expected data set only to make the user aware that the related actual data has different value.

Can you kindly assist me with your finding that helped you earlier to overcome a similar situation?

Regards,

Kaustav.

Hi @Kaustavc1991,
You can make use of the workflow that I had attached with the post. If it doesn’t work for you, do let me know. I will suggest an alternate way to approach the problem.

Thanks and regards,
Ananthu

1 Like

Hi lainh…Invoke code is Good which you coded…

I have requirement like First data Tble1 data

EmpDate EmpNum Code
12/02/2019 12345 423
12/03/2019 12346 424
12/04/2019 12347 425

sencond data table as
Date Num Code1
12/02/2019 12345 423
12/03/2019 12346 423
12/04/2019 12347 425
Based on this Matching condition EmpDate<=Date and EmpNum=Num and Code=Code1 Bases on this condition I have to add second data table record to data Table as output
Note:Here First data table first record has to compare with all the records of second data table as per above condition and based on successful match I have to get secondDatatable record to datatable…Can I expect Invoke code for this why I am going invoke is because my data table having huge data

@Prad
project.zip (14.7 KB)
Hi,

I had a similar requirement. achieved with the use of merge datatable and excel formulas.
Attaching the sample.

1 Like

Hi @Ananthu, I am facing with the similar problem,
I have two folders.
Folder1 & Folder2.
Where I have 5 files in Folder1 & 5 files in Folder2.
I want to compare the cell value of folder1 files with the cell value of Folder2 files.

Like A2 cell value file1 in A2 cell in file1 in Folder2. If vallue is same then want to write the Match/Unmatch into another excel file
Note Please don’t get confused files name is same in both the folder.

Here I want to give the dynamic file name and cell range. Can you please help me on this. Thanks

I built the logic but it doesn’t worked, Bcz I am opening the update files whenever I use the write cell,so it corrupt my file.

Hi @balkishan
What do you mean by file corrupting??? When you try to use write cell

Hey

Here is a detailed article on that :slight_smile:

Regards,

2 Likes

hey @lainh ,your code is working when both the excel file is having same number of rows and columns.
Suppose, source file having just 2 rows and destination file have many rows. And , have to compare each row of source file with destination file. Then, what will be the invoke code for this scenarios.

1 Like

hey @sandy1
invoke code will be the same.
but, you should get the same column from the datatable of the destination file.
Then you can use the [invoke code ] to compare.
Here is my sample : comparing-two-datatables.zip (29.9 KB)

1 Like

thank you so much @sharathraju489. thank you thank youuuuuuu :innocent::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck::star_struck:

2 Likes

Hi ,

Could you please share the solution here ,

Regards

Smitha