Exclude columns/cells from formula

Tags: #<Tag:0x00007f8b1dfaa9b0>

Hi,

I am trying to use formulas in my table. The problem is that I am using a custom renderer for a few columns. The data for those columns is passed as POJOs (e.g. {label: "abc"}) while the data for the other columns is number which is rendered using a standard renderer for numbers. My goal was to enable simple calculations (e.g. =3*4) on the columns/cells with number values.

When initializing the handsontable instance I get an UnableToParseError on the POJO.

Is there any way to configure formula to exclude the columns/cells or to provide a custom function for parsing those values?

Thanks!

Hi @groeger

Can you create a demo which we will be able to discuss further in detail and debug together? That would help us understand the issues and ensure we’re on the same page.

Hi @aleksandra_budnik

here is a quick demo that should work when formula is off but produces an error when formula is active. https://jsfiddle.net/rfk9mL05/

Thank you for the demo. Just as I thought, the following action returns an error as it handles only primitives - you can check it here https://github.com/handsontable/hyperformula/blob/a56a9703567ae1772bfaeeea9f452562cfc17614/src/CellContentParser.ts#L92

If you would like to hold a ‘key’ in a cell I recommend using cell metadata instead. Here https://jsfiddle.net/handsoncode/tb7rw0xk/ is an example on how to hold and manage extra metadata.