Hi my friends,
¿Is there any way to add all the values of a column of a Data Table obtained after a Read Range Activity, and assing the result into a variable?
Thanks in advance!
Hi my friends,
¿Is there any way to add all the values of a column of a Data Table obtained after a Read Range Activity, and assing the result into a variable?
Thanks in advance!
we can do (add by the understanding of value retrieval):
arrValues =
YourDataTableVar.AsEnumerable.Select(Function (x) x(YourColNameIrIndex).ToString).toArray
it will return us a string array and will work when the datatype of the data column is a simple datatype as string, int32, double…
About LINQ have a look here as well:
Hello @dla - How about below expression
Variable of type double Output = DT.AsEnumerable.Sum(Function(x) Cdbl(x("Price")))
Reference code - Example.zip (10.2 KB)
Hi @dla ,
if you want to add column value plz check below workflow
ColumnValueAddToDataTable.xaml (10.1 KB)
Thanks,
Raj
Thank you a lot, it works!!
Thank you a lot!!
It`s also a soltion. I appologize I can only mark one answer as a solution.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.