Posted 20 April 2023, 12:24 am EST
Hello,
Please note that the cell merge behavior in SpreadJS is by design. It is not a bug but the merge feature is different than the MS Excel merge. The merge behavior in SpreadJS is implemented to preserve the values of cells before they were merged when the merged cell is unmerged unlike MS Excel.
In MS Excel, when more than one cells are merged then data of other cells except the first cell is cleared and their values can not be preserved when merged cell is unmerged again.
However, in SpreadJS, when a merged cell is unmerged then all the cells that were merged still contain there original values before merging. That is why, when cells are merged in SpreadJS, if the first cell of the selection is empty then the merged cell will also be empty. This behavior is to preserve the original values of the cells that are merged.
It is important to note that SpreadJS exposes various APIs through which you could implement the MS Excel’s merge behavior.
Please let us know if you still have any doubts.
Regards,
Ankit