Summarize data by column direction

Example
There is an Excel file Book1.xlsx, the data is as follows:

From a certain test score of the three classes, sum up the number of each class and the total scores of all subjects (including mathematics, English, and PE):

Write SPL script:
Method 1: Structured data

A1 Read Excel data
A2 Group by class, calculate the number of people in each class, num, the total score of all subjects (columns 3 to 5), total, where ${to(3,5).(“#”/~).concat(“+”)} combine into text: #3+#4+#5
A3 Export result A2 to result.xlsx
Method 2: Two-dimensional array

A1 Read Excel data, start reading from the second row, and read it as a two-dimensional array
A2 Group by class (first column), calculate the number of people in each class, num, the total scores of all subjects (from the third column), total
A3 Export result A2 to result.xlsx