[GH #1366] Issue with copy paste with merge cells

Tags: #<Tag:0x00007f135f500770> #<Tag:0x00007f135f500630>

When copy-pasting with merge cells the old and new values are not coming correctly.
For example I have 4 rows that merged into 2 rows and when I paste data from Excel by selecting these two cells the data gets repeated 4 times instead of 2.

HI All,
this issue is reported by me while replying can you please loop me as well?
-Abhilash

Hi @abhilash.keerampara / @jagadesh.m

I think that I would need a little bit more details here. I tested the latest version (v12.4.0) with merged cells on both sides and do not seem to experience any repetition.

What I did

I created such a dataset in Google sheets

04

now I pasted it to a non-merged area in Handsontable - and the result is correct as Handsontable does not copy the cell meta (merging) it copies data underneath.

34

Then I used the merged cell (3, 4) to paste the same data there, and it also works as expected - the merging stays as it was an we get the new data pasted.

57

Can you share an example/demo with steps to replicate the issue? Do you have any hooks set for the beforePaste / afterPaste or beforeChange / afterChange?

We have a table like
image

and now when we copy past two different rows from Excel like

image

We are getting that as

image

the expected is
image

When I checked the afterChange event since the destination has 4 rows and I copied only 2 it’s coming as repeated

In this case, in my second row, I should get “i11,i21,i31” but I’m getting “i10,i20,i30”. Is there any way I can get this fix?

not directly in sheets i don’t think..

have you tried pasting them into a google doc (or email for that matter) then copying both from there and re-pasting in a cell..?

Hi @abhilash.keerampara / @jagadesh.m

I have tested your issue with the scenario you provided, and I was able to reproduce it while copying the values from Excel. I reported the issue internally for further investigation. We will keep you updated.

Thanks Adrian. Can you help me to get and response ETA?

Hi @abhilash.keerampara

I will update you tomorrow on this, after we will consult it with the development team.

Hi Adrian,
Any update on this?
-Abhilash

Hi @abhilash.keerampara

Sorry for the delay, we had to do additional testing with the issue. We will propose it on the next planning meeting, then we will have more information about the estimated fix for this. I’ll keep you updated.