grid spreadsheet copy paste error

This issue has been tracked since 2021-11-30.

bandicam 2021-11-30 17-45-11-405

ooo4321 wrote this answer on 2021-11-30

I configured the grid by adding selectType: 'cell' and nothing else, the recid of the rows is set and are distinct.

When i copy the cell values to excel it works, no problem but when i try to copy the values from excel to the grid it works except that it's nullifing the first value of the row below of the last pasted row ... So in the example i am pasting 3 cells from excel it works but the problem is that it changes also the 4th ... Any ideea ?

ooo4321 wrote this answer on 2021-11-30

the columns are configured as follows

{ field: 'tip', text: 'Tip', size: '110px', sortable: true, resizable: true, required: true,
editable: { type: 'list', items: ['Principal','Secundar','Terti'], filter: false, showAll: true,
}
},
{ field: 'text', text: 'Cod Caen', size: '45%', sortable: true, resizable: true, searchable: true, required: true,
editable: {
openOnFocus: true,
type: 'list',
minLength: 3,
url : 'https://api.something.com/v1/caen/caen',
method: 'GET',
match : 'contains',
}
},
{ field: 'text2', text: 'Locatie', size: '45%', sortable: true, resizable: true, searchable: true, required: true,
editable: {
openOnFocus: true,
showAll: true,
type: 'list',
url : 'https://api.something.com/v1/caen/locatie',
method: 'GET',
match : 'contains',
}
},

ooo4321 wrote this answer on 2021-11-30

I am doing the copy/paste with crtl + c /ctrl + v tried both chrome and firefox ...

mpf82 wrote this answer on 2021-11-30

There's already two open issue about this:

#1266

#1892

Basically, it's somewhat Excel's fault for adding an additional "\n" to the copied data.

You could also argue that it's w2ui's fault for not handling Excel's faulty clipboard data correctly ...

You can try to apply the fix mentioned in #1892 (modify onPaste) - but as explained in the fix, this might "drop" the last cell if you are copying empty cells from w2grid to w2grid. So take the fix with a grain of salt.

More Details About Repo
Owner Name vitmalina
Repo Name w2ui
Full Name vitmalina/w2ui
Language JavaScript
Created Date 2011-04-12
Updated Date 2022-06-22
Star Count 2000
Watcher Count 179
Fork Count 665
Issue Count 255

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date