Excel Variable SUM Formula

Well

Just a small Input Just take your Excel Data from Excel by using Excel application scope and Read range activity then fire the below linq piece of code to take the sum out of it.

and add the new row in the the datatable and write it in your Excel :slight_smile:. Every time with range you don’t have to deal with :slight_smile:

Int32 sum_col_2 = dt.AsEnumerable().Sum(function(r) r.Field(Of Int32)("Col2"))

or you can use even write cell with the sum_col_2 value :slight_smile:

Sample - datatble col sum.xaml (9.3 KB)

Regards…!!
Aksh

1 Like