Concatenate the same group of data into text

Example

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

Group by DEPT and bring NAME together, the result is as follows:

Write SPL script:


A

1

=T("e:/work/emp.xlsx")

2

=A1.group(DEPT;~.(NAME).concat@c():NAME)

3

=T("e:/work/emp2.xlsx",A2)

A1 Read emp.xlsx file

A2 Group by DEPT, and concatenate the NAME sequence in the group with a comma to form a text named NAME field

A3 Save the result in A2 to the file emp2.xlsx