sanju_RPA
(Sanju Rpa)
February 18, 2019, 12:52pm
1
I’m new to Uipath. Can anyone please explain how to compare the columns in one excel with the respective columns in another excel.
Susana
(Susana González Cacheiro)
February 18, 2019, 1:04pm
2
Hello @sanju_RPA ,
Have you tried to read both files with the read Rangel activity storing the values in a dataTable.
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Once you have the two datatables you only have to compare them row by row or maybe using a filter. It is depends on what you need to achieve.
Hello Community
Use Below Code to Compare 2 Datatable Column and Get Matched and Not Matched Records
Note- Based on your datatable column datatype update datatype here with column field.
To Get Matched Records
Datatable Out_Matched_Data = In_DataTable1.AsEnumerable().Where(function(row) In_DataTable2.AsEnumerable().Select(function(r) r.Field(Of Int32)(In_DT2_ColName_To_Match.ToString)).Any(function(x) x = row.Field(Of Int32)(In_DT1_ColName_To_Match.ToString))).CopyToDataTable()
To Get Not…
Can you give us more detalles?
Best regards,
Susana
2 Likes
sanju_RPA
(Sanju Rpa)
February 20, 2019, 9:38am
3
Hi @Susana
I had read the two excel files using read range activity and stored into a two datatables. But I’m getting trouble to iterate those datatables and compare each column.