Cell value calculation depend upon other cell edit

Tags: #<Tag:0x00007f8b2a18d078>

I have used Handson table in my angular application development. There has some non-editable cell, and those non-editable cell value will be displayed by calculating of some other cells. On cell value change also need to re-calculate the cell value. How can we achieve this in angular? If there have any such example in angular that will be very helpful.

Thank & Regards,
Santu

Hi @santu.nandi

Thank you for contacting us. I’ve prepared the example that shows how it can be done in Angular:

https://jsfiddle.net/aszymanski/xgweyn42/

Is this what you needed?

Yes, I need like this. But without excel like formula can we implement this? If, yes then how we can implement?

And how this will work if the columns are dynamic?

Tanks & Regards,
Santu

Hi @santu.nandi

I’m not sure what do you mean by that:

But without excel like formula can we implement this?

About the second question. Do you mean to have manual column moving enabled?

On your given example you have calculated using excel formula using excel cell position like A1, B1, C1. But in my case the grid configuration is dynamic. It’s hard to get the cell position.
Is it possible to use the data property to calculate the cell value like (value1+ value2+ value3), without cell position.

Hi @santu.nandi

I think that named expressions would be a good solution in this case, you can read more about it here:

https://hyperformula.handsontable.com/guide/named-expressions.html#named-expressions

It also works for dynamic ranges.

I am currently using handson table version 7. Is there have any example for that version?

Hi @santu.nandi

To use this feature you would need to upgrade to, at least, version 9 when we changed the formulas engine to Hyperformula. The older one is not capable of doing this.

How we can get the cell name like A1, B1, C1 in a dynamic column config.

Is there any way to get the cell name from header name?

Hi @santu.nandi

Can you show me your current implementation so I can see the code?

Hi @santu.nandi

is the issue still present?

No

Thank you for the update. I will then close this topic.

Please create a new one when needed.