[GH #5459] How do I set formula information for a cell?

Tags: #<Tag:0x00007f0aff041a58> #<Tag:0x00007f0aff0418c8>

Hello!
I set the formula in the cell and then saved the data to the server through getSourceData(). When I get the data rendering from the server, the values in the cell are calculated, but the formulas are lost. I want to know how to set the formula information for the cell.
Thanks.

Hey @dongjb0502

with the getSourceData you should get the formula. Here is an example https://jsfiddle.net/handsoncode/kazd1L73/

Can you share your demo?

Yes, I can get the formula from getSourceData, and then when I use this data to render, the formula is lost.

Demo: http://jsrun.net/SJXKp/edit

Look at the E4 and F4 cells. There are formulas in the data source.

I cannot see this logic in the online example. Can you add it, please?

Hey @dongjb0502

Can you share the demo or Is there anything else I can do for you?

Again, please see the demo above.
If the source data contains a formula, double click on the cell. Isn’t the input box a formula instead of a calculated value? See E4 and F4.

Yes, you’re right. Sorry, I’ve misunderstood the issue.
It looks like the mergeCells is responsible for this issue. Here is a corresponding issue https://github.com/handsontable/handsontable/issues/5459. I will update you as soon as we fix it.