Thank you @vvaidya but I also want to sum integers or decimals on the consolidated lines (rather than displaying the individual results on the same line). Also, can this not be done directly in the data table rather than using excel?
I’d say just do a couple of loops through the datatable using a counter either with while loops in a sequence or using decisions in a flowchart. Reference the rows like datatable(counter)(0).
First run, just get all the unique names. If it’s a new name put in an array. Check the array each loop and keep adding the uniques to the end.
The loop through the array, match the name in the datatable column 0 and then if it matches have a second array that matches the first (but of type integer or double).
At the end, just write out the arrays or else put into a new datatable or whatever you need to do with them.
the above solution is when a datatable is actually built/configured with in uipath, but in case when a datatable is a result of a read from a csv/xls file, in which case the columns are by default of strings…
How to calculate for a specific column in that case which has a int/double values…
Assign : Syntax error in aggregate argument: Expecting a single column argument with possible ‘Child’ qualifier.
If I remove Cdbl conversion, row(1) = datatable.Compute(“sum([Total Count])”, “TranType='” &row(0).ToString & “'”)
The error is, Assign : Invalid usage of aggregate function Sum() and Type: String.