Sum Column without Name

Can you sum a column in excel that doesn’t have a column name? I just want to sum column A and then append tha tsum to the bottom of my excel. Thanks!

Hi
Hope this expression would help you resolve this
Once after getting the datatable with read range activity use a assign activity like this

int_sum = dt.AsEnumerable.Sum(Function(x) If(IsNumeric(x(columnindex).ToString.Trim),CDbl(x(columnindex).ToString.Trim),0))

Where int_sum is a variable of type int32
And column index starts from 0 for first column

Which we can write back to excel with WRITE CELL Activity

Cheers @gregelliott

2 Likes

Thank you @Palaniyappan
It worked. what is x in this long formula?

@gregelliott

Returns the sum of an expression evaluated for each row in a table.

Regards,
Srenivasan kannan

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