Hello All,
I am new to UIpath. Been trying to build a bot to compare two excel files. Been reading the forum and some of the replies are very useful.
So far, for my project, I managed to “read range” and set up the two excel files into two data tables.
I used the following code to find the results that does not match.
DataTable2.AsEnumerable().Where(function(row) Not DataTable1.AsEnumerable().Select(function(r) r.Field(Of String)(“Column A”)).Any(function(x) x = row.Field(Of String)(“Column A”))).CopyToDataTable()
Interestingly, the results throw out a lot of non-matched although most of the data should match if I do a vlookup in excel.
I checked and found out that the matched rows are up to 8 characters in column A. If the cell in column A has 9 or 10 characters, no matching was done. Not sure why is this so. Anybody has any idea if there is a problem with the code above?
Or if there is any kind soul here who can help me to do up a .xaml. The two sample excel are below.
Excel 1
Column A Column B Column C
123456789 CDE 555
23456789 EFG 666
234567890 XXX 666
12345678 ABC 555
66666666 XXX 555
Excel 2
Column A Column B Column C
12345678 ABC 555
123456789 CDE 555
23456789 EFG 666
234567890 GHI 666
Column A is the unique identifier for the two files. If Column A matches, the workflow should check Column B and Column C to make sure they match.
Thank you very much in advance.