Write cell issue on output sheet

May I ask what mistake do i make then the current result like that?:

It is supposed the result should be like this,

Can anyone help me to check my workflow and enable me to cope with this issue? Many thanks!!!
My workflow:
MU-Rep sorting ver…xaml (30.3 KB)

Use filter data table after read the Excel and remove when Column Date Start is Empty

MU-Rep sorting ver…xaml (31.6 KB)

Still can’t, now will be like this…

template 23.2.24.xlsx (33.2 KB)

Hi @Happydayyy ,

Could you check with the below modified workflow :
WriteCell_Output.zip (34.3 KB)

To make it clear, I believe the problem was with the Input data that you were using. Empty spaces were found in the 2.1 Summary sheet at the end. I deleted the empty rows found in that sheet and that particular issue was resolved (assumed it was a typo error in the sheet).

In addition to the above, I made a correction in the workflow by removing a For Each Row loop as I thought it was not necessary (simply looping the rows and performing the same operation again and again).

If you think that the Input data that you would receive would have the empty rows at the end, then we could add another Expression to remove empty rows and then perform the next steps.

Let us know if you were able to test the modified workflow and if the output is as desired.

Thank you so much, the issue has been solved.
But may I ask that what if in case of there is a empty row in the input file, what activity and how can I cope for it, or/and is there any sample workflow I can take reference?