Bulk update in handsontable

Tags: #<Tag:0x00007f8b2593b220>

Hi @aleksandra_budnik ,

I am researching on excel to implement it in one of the projects which required a bulk update after rendering the handsontable but using setDataAtCell to update the bulk data is very time taking approx 30-40 sec. So Is there any way to adding bulk data in less time.

Hi @preet.saxena

In some of the cases, you can use the loadData method instead.

I have already checked the loadData in the doc but the documentation is not well enough to understand the functionality, What kind of array it will take ?

Also, I think after loading the data hooks are not going to work again ?

Good morning,

the loadData will load every 2D array that you pass. You should be aware that if you use columns data may not be visible. The loadData itself works the same as setDataAtCell when we consider hooks that are being called.

As you can see here https://jsfiddle.net/handsoncode/r8nb5ch6/ only the data has been changed. All the other settings like colHeaders or height remain the same.

And here https://jsfiddle.net/handsoncode/jkwb27nh/ I’ve added an afterChange hook that gives us the same amount of information after data is loaded via inital data call and the same one for the loadData method.