Copy/Paste data

Tags: #<Tag:0x00007efc6150d6b0>

Hi,
I want to be able to copy paste data from an excel to hot table view, does hot table let us paste random number of rows? if so could share an example?

When I try to do this, my beforeValidateHook is trying to access the data and am getting error

beforeValidate: function (value, row, prop, source) {
return { “value”: value, “row”: row, “columnType”: prop, “loadType”: this.getData()[row][0], “irrPlan”: this.getData()[row][4] }; //I want to be able to access column 0 and 4 in my validate function.
},

Also is there a way to temporarily pause the validation and enable it later?

Do you mean random like generating random or a different value each time?
Basically Handsontable pastes whatever you have in the clipboard. If you’d like to change that you can alter the dataset via beforePaste hook https://handsontable.com/docs/7.4.2/Hooks.html#event:beforePaste

Oh ok, is there a way to temporarily disable validations?

You can set the cells to be text cell type - as a text cell type doesn’t have a cell validator