I want calculate Excel spreadsheet with a list of sales transactions, and need to calculate the total sales amount for each customer and output the results into a new Excel sheet…Ex.1) Sales Amount 2) Customer Name
Hi you can try with this approach.
From row In dataTable.AsEnumerable()
Group row By CustomerName = row.Field(Of String)(“CustomerName”) Into Group
Select New With {
.CustomerName = CustomerName,
.TotalSales = Group.Sum(Function(row) row.Field(Of Double)(“SalesAmount”))
}
dataTable - Read Range Output
Steps
- use Read Range and create the OP
- Use assign ( var type- DataTable )Activity & pass the query
- Use write range activity & write the output
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.