How to Sum 2 columns data by specific row number

Example : DT
Column0 Column1 Column2 Column3 Column4
Row 0 Test1 2 3 4 2
Row 1 Test1 2 5 3 1
Row 2 Test1 1 4 2 3

I need sum of each row specific columns. End result needed is.
Sum = DT.Rows(0)(2)+DT.rows(0)(3) = 7
Sum = DT.Rows(1)(2)+DT.rows(1)(3) = 8
Sum = DT.Rows(2)(2)+DT.rosw(2)(3) = 6

1 Like

Hi @reddysrs

Welcome to uipath community

Here you go a sample of your scenario,
check the excel file before and after running the xaml
you can get the total value in the last row for each column as you expect (8.7 KB)

Run the xaml and you will get the sum value
Kindly try this and let know buddy whether this works or not
Cheers @reddysrs

1 Like

The XAML has errors as I open

Thanks for Quick response Palani.

May i know the error @reddysrs

Activity can not be loaded because of errors in the XAML

No worries
what is your studio version buddy @reddysrs
go to manage pacakages and open project dependencies tab in left side
once opening, if your version is 19.4 or something update the version of uipath.system.activities and uipath.uiautomation.activities and uipath.excel.actvities to that updates


if your version is 18.3 or something try to update the version of the above mentioned activities to that update version by clicking on this and these are versions
kindly update the package to these versions and see in the design panel you can see the activities for sure

Kindly try this and let know buddy
Cheers @reddysrs

I have just installed both uipath.system.activities and uipath.uiautomation.activities. version.

Already had and uipath.excel.actvities with version 2.0.6479.13204

Uipath 2017 Studio 2017.1.6522. Its Enterprise Edition that I have.

Still have error
Could not find member ‘CurrentIndex’ in type ‘’. Row: 91, Column: 24

kindly choose the version of all the packages you have in your project dependencies as per the above image mentioned package versions…
Then you can see the activities involved in the workflow
Cheers @reddysrs

I have found an another way @Palaniyappan by using for loop and assign
Dbsum = dbSum+Convert.ToDouble(row())+Convert.ToDouble(row(2)) where DBsum is a variable type of double.
Once I get the sum assigned to row I needed to. Thanks for all the help so far.

Do you have idea on this thread that I created -

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