Compare 2 excel and write row according to it

Hello everyone,

To example what I need:

Main Excel (dont mind blah blah columns the excel has 9 columns, thats What I meant)


Check Excel

I want to compare “Material” column(mainexcel) and “Number” column(checkexcel) then make the matching row as matched on the main [excel](
q=excel%20status%3Asolved) (without corrupting the excels format, its xlsm-macro enabled doc. so I dont want to break it :slight_smile: )

I checked post similar to this problem but they dont help because they mostly write about comparing not about writing match or no match.

Hi jntrk,

Here are the steps for getting the matching rows & updating the status against it:

  1. Read Main table as T1 & Check table as T2.
  2. Read ‘Number’ column from T2 into a List variable.
  3. For each row in T1, if row(‘Material’) value is available in List, update Status as ‘Match’.
  4. Finally write back the updated T1.

Let me know if this helps…

Hi @jntrk

Basic logic is u can use lookup datatable activitiy to look the material column values in Number column.values if the rows is existing then use write cell to write the data into the particular row

Hope it helps


Nived N :robot:

Happy Automation :slight_smile::slight_smile::slight_smile:

I did this a while back. Just a simple datatable compare and if it is a match write(or execute) something.

@NIVED_NAMBIAR @ashwini.kempraj @Skyman1

The problem is this is a 10000 lined excel document so I cannot use for each activity. I did use for each and at somewhere it gives an error without a reason. So I dont want to do this with for each, its working problematic.

Maybe a linq or a dt.join of somekind can work.