How to get sum of excel column

Hello. I’m wondering how to get sum of one excel column? Do you know how can I get it?

Hi @Olivera_Kalinic,

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

Regards,
MY

Hello.

Try this:

yourDataTable.AsEnumerable().Sum(Function(r) r.Field(Of Double)(“Column Name”))

OR

yourDataTable.AsEnumerable().Sum(Function(r) r.Field(Of Integer)(“Column Name”))

hUG

Hi!

Try this

Regards,
NaNi

Hello,

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

Hello,

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