[GH #8391] Hyperfomula, updating cell/formula references which is the proper method?

Tags: #<Tag:0x00007efc6d7eb7b8> #<Tag:0x00007efc6d7eb358>

Hello everyone…
I’m using Hyperformula with 2 Hot instances using Vlookups between the instances,… the formula syntaxs works on the loadData of the Hots, but as new rows are inserted into any of the Hots I created a routine to refresh/reset the references of the Vlookup formulas inside the Hots to reflect the new lookup range but is not working using the following:

Hot.SetDataAtCell(0,5,’=Vlookup(B5,Sheet1!A1:B20,2,“False”)’);
using this method results on the Hot showing the formula as text and altering the untouched rows/cols existing formulas to text as well;

HyperformulaCommonInstance.setCellContent({row:0, col: 5, sheet: 0}, ‘’=Vlookup(B5,Sheet1!A1:B20,2,“False”)’’);
HyperformulaCommonInstance.setCellContent({row:0, col: 5, sheet: ‘Sheet1’}, ‘’=Vlookup(B5,Sheet1!A1:B20,2,“False”)’’);
using these methods does not seem to be doing any action on the Hots.

What is the correct method to update/refresh the references of formulas programmatically ?

regards

Hi @adonisbriceno

It seems that you are experiencing this issue https://github.com/handsontable/handsontable/issues/8391

Can you confirm if that is the same use case (you update the formula via HF API, not via Handsontable API)

Yes Alek,… trough a shared HF api… is that a known bug ? or should I approach the update differently ?

I will be sure if it is the same issue and if there are any workarounds if you could share a demo with a reproduction. We can work on this demo https://jsfiddle.net/grw03hpe/2/ that we had in a separate topic.

Alek the way I could worked it was changing the data binding of the Hots,… originally I had them binded with an Array of objects causing the malfunction… I did a test turning my objects into Arrays of Arrays and it worked as expected, dont know why and I could not find on the documentation any reason or explanation to why an array of objects may affect the behaviour of the formulas and the display, but well at least I could moved forward and just sharing the workaround.

I will let you know as soon as well fix the issue linked above. I think that this causes the issue in your application.