How to Insert an Empty Row Wherever the Excel Cell Value Is Changed

We have an Excel file book1.xlsxcontaining data as follows:

AHMAD MAULUD

AHMAD MAULUD

AHMAD MAULUD

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

MANCHESTER

MANCHESTER

MANCHESTER

Now we need to insert an empty row each time the cell value is different. The expected table is as follows:

AHMAD MAULUD

AHMAD MAULUD

AHMAD MAULUD

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

DOLLY INDRA SIREGAR

MANCHESTER

MANCHESTER

MANCHESTER

It is convenient to do this in esProc.
You can download esProc installation package and freeDSKlicense file HERE.

1.        Write script p1.dfxin esProc:

A

1

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

2

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

3

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

A1  Read in data of book1.xlsx; @w option enables reading data as a sequence of sequences.

A2   Create a new group whenever the cell value changes and insert an empty row at the end of the last group, and then concatenate all groups.

A3   Export A2’s result to book2.xlsx; @w option enables outputting data as a sequence of sequences.

2.     Execute the script to get the desired table in book2.xlsx