How to compare 2 row in 2 file excel, if data not equal then add result excel and add column status "Not Ok" or "OK"

How to compare 2 row in 2 file excel, if data not equal then add result excel and add column status “Not Ok” or “OK”

Use Case Description

I have reached the stage of Joint 2 Excel files, it’s just still confused when giving conditions to add columns if columns A and B do not have the same value

AS-IS WORKFLOW, TO-BE WORKFLOW

File2.xlsx

Other information about the use case

Industry categories for this use case: Finance, Banking

Skill level required: Beginners

UiPath Products that were used: UiPath Studio, UiPath Data Services, UiPath StudioX

Other applications that were used: EXCEL

Other resources: -

What is the top ROI driver for this use case?: Improve customer experience

Hi @bayu.herlambang - read Excel data into the datatable and do your operations on that update datatable and write back that on datable on your excel file.

1 Like

hey @bayu.herlambang
try to use for each for dt from first file:
if → row("ColumnA").ToString() = dt2.Rows(dt1.Rows.IndexOf(row))("ColumnA").ToString() AndAlso row("ColumnB").ToString() = dt2.Rows(dt1.Rows.IndexOf(row))("ColumnB").ToString()
“Then” - assign “OK” to the “Status” column of the current row.
“Else” - assign “Not OK”.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.