I want to sum the data in a colum in an excel file
I want to write the value of the sum at the end of the colum, idk if I cant use the activity write in cel because some tables are bigger than others
Hi @Juandix
You can try with this expression?
(From d in dtData.AsEnumerable Where Not (isNothing(d(1)) OrElse String.IsNullorEmpty(d(1).toString.Trim)) Select v = CDbl(d(1).toString.Trim)).Sum(Function (x) x)
Check out this XAML file
SumUsingLINQ.xaml (7.6 KB)
Regards
Gokul
I already have the table created, do I have to change the build data table activity?
HI @Juandix
This XAML file is for an sample reference. Instead of Build data Table activity you can use Excel Read Range
activity.
Regards
gokul
How I write the total of the sum at the end of the column I did it like this
Hi @Juandix,
What about this workflow.
you almost there, just set ‘valor’ default value as 0 like below mentioned screenshot 3 point
after loop user write cell Activity for sum value, use below mentioned range, like point 2
valor+CDbl(CurrentRow(“Col1”))
Range
“B”+(dt.RowCount+2).ToString
Xaml
Sequence11.xaml (9.7 KB)
Best
Rajkumar
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.