I need help invoking a code to add inputs together in an excel sheet. My workflow starts as executing a SOQL activity to pull data from salesforce, i take this data and write it to an excel sheet using write range. The output is SalesforceReportDT. In the excel it shows two rows, the ID and Amount. There are multiple ID entrys for some IDs. Now i need to invoke code so i can get the excel sheet to combine all the same ID’s and add the ammount together to just have one row for the ID. Th excel sheet looks like this.
tested with a mini set approach from above:
Flow
I/O
(From d In dtData.asEnumerable
Group d By k=d(0).toString.Trim Into grp=Group
Let s = grp.Sum(Function (x) CInt(x(1).toString.Trim))
Let ra = New Object(){k,s}
Select r=dtResult.Rows.Add(ra)).CopyToDataTable