Compare 2 excel sheets to verify total

I have 2 excel sheets like this

Sheet 1 :

image

Sheet 2 :

image

Now what I want to do is From sheet 1 i need to add up all the numbers and see if the total matches to the number of the second sheet or not

how to achieve this

1 Like

Test (2).xaml (10.9 KB)
test.xlsx (10.1 KB)

sheet1
image

sheet2
image

RESULT
image

Hi @Ishan_Shelke

  1. First read the data in the sheet1 using read range activity which will give the output as datatable

  2. In Assign you can use the following to get the sum of columns:

int SumOfData = DT.AsEnumerable.Sum(Function (x) Convert.ToInt32(x.Item(“YourColumnName”).ToString))

  1. You can read the cell from the sheet2 and compare it with the sum

Regards,
Rajeswari

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