Formula Selection text change

Posted by: sathwik.kotla on 8 November 2022, 6:09 pm EST

  • Posted 8 November 2022, 6:09 pm EST

    Hi Team,

    I want to change the resultant value from the cell address to that of the column header name. For example, If I am in editing mode in a cell and we click on any cell we get the cell’s address for example =SUM(A1 when we click on column A and 1st row that should be replaced with the column header name in the A column i.e =SUM([COLUMNNAME].

    Please help me to achieve the use case.

  • Posted 9 November 2022, 11:40 pm EST

    Hi Sathwik,

    We are sorry, but currently the requested feature is not supported in the SpreadJS. We are sorry for the inconvenience.

    Regards,

    Ankit

  • Posted 10 November 2022, 3:18 pm EST - Updated 10 November 2022, 3:23 pm EST

    Hi Ankit,

    Can we get what are the cell selections that are done by the user?

    For all the cells that are highlighted in the image, can we get the selections list?

    Do we have any API that handles the value changing in the editor when we select cells in formula.

  • Posted 13 November 2022, 3:11 pm EST - Updated 13 November 2022, 3:16 pm EST

    Hi,

    If you are in Edit mode, you can use the formulaToExpression method to parse the formula to expression tree. You will get the formula name and the arguments of the formula.

    formulaToExpression method: https://www.grapecity.com/spreadjs/api/modules/GC.Spread.Sheets.CalcEngine#formulatoexpression

    You could also refer to the following sample that I have created for you: https://jscodemine.grapecity.com/share/qmHMRTnvBEedIRsY91OCpg/

    You could also use the getDependents method and getPrecedents method to get the dependents and precedent of the formula. You could refer to the following demo:

    Get Dependents Demo: https://www.grapecity.com/spreadjs/demos/features/calculation/formula-trace/get-dependent/purejs

    Get Precedents Demo: https://www.grapecity.com/spreadjs/demos/features/calculation/formula-trace/get-precedent/purejs

    Regards,

    Ankit

Need extra support?

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

Learn More

Forum Channels