Think of an excel with 15 rows, in this excel when I select and copy rows 2, 4, 7, 9, 11 and 12, it copies all rows between rows 2 and 12. When I paste it to Handsontable, it pastes it in the same way. I want to paste the rows I selected in handsontable.
Note: These rows are examples and I do not want to do any work in Excel, I want to do it in HandsonTable.
I tried this method:
scope.hot.addHook('afterPaste', function (changes){}
All the lines I copied in the Changes parameter come as an array.
Think of an excel with 15 rows, in this excel when I select and copy rows 2, 4, 7, 9, 11 and 12, it copies all rows between rows 2 and 12. When I paste it to Handsontable, it pastes it in the same way. I want to paste the rows I selected in handsontable.
Note: These rows are examples and I do not want to do any work in Excel, I want to do it in HandsonTable.
I tried this method:
scope.hot.addHook('afterPaste', function (changes){}
All the lines I copied in the Changes parameter come as an array.
Share Improve this question asked Jan 20 at 13:23 Celal SunnetciCelal Sunnetci 395 bronze badges1 Answer
Reset to default 1Handsontable doesn't provide a non-consecutive cell copy/paste. However, you can use the beforePaste to return false
and read data from getSelected()
method. It will give you cell cooordinates for all the ranges. Then, based on ranges, you can call getDataAtCell()
method to read the data that is copied.