what if i want to do addition of cell values which i had passed in read range or write range activity .how can i do that ?
like
Column A
21
23
21
34
54
153 so finally i want addition of this value using read range or write rang activity
Yah thats possible with READ RANGE activity
like get the datatable as output and then we can use a assign activity like this out_value = dt.AsEnumerable.Sum(Function(x) If(IsNumeric(x(“ColumnName”).ToString.Trim),CDbl(x(“ColumnName”).ToString.Trim),0))
thanks @Palaniyappan
Can you elaborate this out_value = dt.AsEnumerable.Sum(Function(x) If(IsNumeric(x(“ColumnName”).ToString.Trim),CDbl(x(“ColumnName”).ToString.Trim),0))
like which variable works what ?
Read Range Output : DT1
Assign : Count=DT1.Rows.count+2 And Sum=0
Use For Each Row
Sum=Sum+Cint(Row(“Column A”).tostring)
After For Each Row
Write Cell
Cell: “A”+Count.Tostring (Note: A is just a Ref put columnA Cell Name)
Value: Sum.Tostring
lets go one by one
dt is your datatable variable
where dt.AsEnumerable will segregate the datatable to datarows
then SUM is a Aggregate Function
which will sum all the values in the specified column in this expression Function(x) If(IsNumeric(x(“ColumnName”).ToString.Trim),CDbl(x(“ColumnName”).ToString.Trim),0)
where this function does a validation like only if the value in each cell of that column along each row is NUMERIC then it will be considered for SUMMATION else taken as 0