DataTable Sum Columns

I want to calculate the total horizontally using Linq in the data table.

Col1 | Col2 | Sum
100 | 200 | 300

@yekho - Hi Welcome to Uipath Forum. I have attached sum link for your reference. Could please refer the link and clarify your doubts. If you not clarify please let me know.

Happy Learning :slightly_smiling_face:

Hi @yekho

Please use the below method.


Thanks, Happy Automation

For a row WE can do with following

row.ItemArray.Sum(function (x) Convert.ToInt32(“0” & x.toString))

1 Like