A way to extract (custom) functions from formula

Posted by: jk on 24 October 2019, 5:03 am EST

    • Post Options:
    • Link

    Posted 24 October 2019, 5:03 am EST

    Hi,

    In order to precalculate data based on custom function parameters I need to extract all functions as strings from a formula.

    Example:

    =SUM(GETCELL(CPTYPE($B$4),DI0M($B$1),DI1M($B$2),DI2M(“/”&B$6&“/”&$A7),DT(“AV”),MODEL(“5/1”),IV($B$3),RW()),GETCELL(CPTYPE($B$4),DI0M($B$1),DI1M($B$2),DI2M(“/”&B$6&“/”&$A7),DT(“AV”),MODEL(“5/1”),IV($B$3),RW())))/GETCELL(…,…)&“/”&GETCELL(…/…)

    four string extracted GETCELL(…) functions I’d use for further processing.

    Is there a SpreadJS function which would help???

    Thanks!

  • Posted 24 October 2019, 7:38 pm EST

    Hi,

    We are sorry but there is no public method exposed by SpreadJS to find custom formulas string from a given formula string. However, I have created a custom function that you could use to achieve the required functionality, please refer to the following sample:

    https://codesandbox.io/s/spread-js-starter-d8ki4

    Regards

    Sharad

  • Posted 9 November 2019, 8:32 am EST

    Thank you, the proposed solution worked very well for me.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels