Calculate the sum of single columns in excel

Hi, I have the next excel sheet and I want to know how to get the sum of the 3 columns marked in yellow and write them in the row that says Total.
Thank you!

image

Hi,

Hope the following sample helps you.

Sample20211209-2.zip (9.4 KB)

Regards,

the work flow works but when I add it to my workflow I get this error
image

Hi,

This means there is non-numeric data (including empty).
For now, can you try to set the following expression at AddDataRow activity?

{"Total"}.Concat(Enumerable.Range(1,3).Select(Function(i) dt.AsEnumerable.Sum(Function(r) if(Double.TryParse( r(i).ToString,New Double),  Double.Parse(r(i).ToString),0)  ).ToString)).ToArray

Regards,

1 Like

Thank you very much, you helped me a lot!

1 Like

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