Empty the Consecutive Same Data Except for the First Row

Example

The data of an Excel file Book1.xlsx is as follows:

..

The C1 column is ordered and has duplicate values, and the task is to empty the non-first rows of the same category. The result is as follows:

..

Write SPL script:


A

1

=file("Book1.xlsx").xlsimport@t()

2

=A1.group(#1).(~.run(if(#==1,,#1=null))).conj()

3

=file("result.xlsx").xlsexport@t(A2)

A1 Read the Excel data

A2 Group the data by the first column (column C1). When the first row of the first column in the group has value, empty the other rows of the column and merge the data.

A3 Export the result to result.xlsx