Insert a blank row with data changing

Example

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

AHMAD MAULUD

AHMAD MAULUD

AHMAD MAULUD

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

MANCHESTER

MANCHESTER

MANCHESTER

Insert a blank row when the values of the two rows change, the results are as follows:

AHMAD MAULUD

AHMAD MAULUD

AHMAD MAULUD


DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR


MANCHESTER

MANCHESTER

MANCHESTER


Write SPL script:


A

1

=file("book1.xlsx").xlsimport@w()

2

=A1.group@o(~).(~|[null]).conj()

3

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

A1 Read the excel file and read it as a sequence composed of sequences

A2 According to the grouping order, add a blank row to the end of each group, and then merge the data in the groups

A3 export results to result.xlsx