Issue with the sum in excel

Hello

I’m trying sum the values an Excel column with the activity “For each row” and although the sum is well done, the process never end and have to reset Uipath. Attach the process for you can helpme what is causing the error.

for each.xaml (42.4 KB)

Libro1.xlsx (237.5 KB)

Thank you very much for help!

Hi,

@Braki

instead forloop you can use LINQ.

use below code to get sum of the column

Convert.ToString(BaseTotal.AsEnumerable().Sum(Function(row) row.Field(Of Double)(“Importes”)))

for each.xaml (39.4 KB)
use this xaml file @Braki
Regards,
Arivu

Hi,

@arivu96, when try prove your process I received the following message:

columna

the column exists and the name is correct

thanks for the help again

@Braki, do you have “Add Headers” checked on your Read Range?

Hi @Braki
In Read range activity ->properties-> Add header check box need to check.
(Refer the xaml what I send to you)

Regards,
Arivu

yes that option is activated!

HI,
@Braki refer this xaml.

for each.xaml (39.4 KB)

Regards,
Arivu

same error “Column ‘Importes’ does not belong to table”

Hi @Braki,

i am getting output correctly can you check again

for each.xaml (9.9 KB)
Libro1.xlsx (227.5 KB)

Regards,
Arivu

1 Like

Hi
It worked correctly !

Thank you very much for the help

U r welcome @Braki

Regards,
Arivu