Hello. I’m wondering how to get sum of one excel column? Do you know how can I get it?
Have you had the opportunity to review the following topic? Try to follow the steps, if you get an error, please let us know.
Calculate sum of excel column - Help - UiPath Community Forum
yourDataTable.AsEnumerable().Sum(Function(r) r.Field(Of Double)(“Column Name”))
yourDataTable.AsEnumerable().Sum(Function(r) r.Field(Of Integer)(“Column Name”))
Read the excel into a datatable and then try the below:
or you can use a for each loop to loop through the datatable and add each value to a variable, thus giving you the sum
I created a article for this question. I mentioned two different ways to solve.
First way: For each
Second way: LINQ
You can read this article: Sum All Values of a Column in Excel | UiPath in 2 Minutes | by Mustafa Ersoy | Sep, 2022 | Medium