How can i compare 2 excel file and if there is a difference write it on an other excel file

How can i compare 2 excel file and if there is a difference write it on an other excel file ???

@Soudios

What you want to compare?

Row-wise?
Column-wise?

Cheers

names, if a new name was added on the file

@Soudios

So basically you want o compare only one column which contains names and check if there are any differneces?

Read both excels into dt1 and dt2

Use dt1.AsEnumerable.Select(function(x) x("Names").ToString).Except(dt2.AsEnumerable.Select(function(x) x("Names").ToString)).ToList to get list of all names that are not matching

Cheerd

do you have an example plz ?

@Soudios

Use Joindatatable activity

Mention which column need to compare

Create an output

And use writerange to write to excel

where i need to put all of that ? do you have a picture ?

@Soudios

@Soudios

The above given is the example code

cheers

it takes a long time more than 5min and nothing yet, is it the good structure ? :


image

@Soudios

yes it will give you the entire data

it takes too long time, is it normal ?
What i need is just the difference between these 2 excel file

@Soudios

Dt1.AsEnumerable().Where(Function(row) Not Dt2.AsEnumerable().Any(Function(x) x(“Item Name”).ToString=row(“Item Description”).ToString)).CopyToDataTable

where i need to put this ?

@Soudios

in the assign activity

newdatatablevar=synatx

https://forum.uipath.com/search?q=compare%20two%20excel%20files

can you show me all the process with the input
image

@Soudios

Main.xaml (16.6 KB)

it doesnt work, it merge the 2 excel file, what i want is to have only the line in plus than the first file

@Soudios

can you share your output which you are expecting