SpreadV11: hasFormula() and formula() API behavior is not consistent with V9

Posted by: viswanath.malepati on 26 June 2018, 7:41 am EST

  • Posted 26 June 2018, 7:41 am EST

    Hi,

    When dealing with formulas, we found that APIs in V9 and V11 are behaving differently, especially when we suspend CalcService, and enter a invalid formula.

    in V9: sheet.hasFormula(row, col) returns false and sheet.getCell(row,col).formula() returns null

    in V11: sheet.hasFormula(row, col) returns trueand sheet.getCell(row,col).formula() returns formula entered by user

    Note: Invalid formula can we incomplete formula like =max() or a syntactically wrong formula like entering English formula in some other culture.

    Please find the attached V9 and V11 html files, to reproduce.

    Steps:

    1. go to any cell (for example 0,0 cell) and enter =IF(true,1,2)

      note: this is a wrong formula, as we are setting a different culture to the spread.

    2. go to console and execute sheet.hasFormula(0,0) → we will see false in V9 and true in V11

    3. go to console and execute sheet.getCell(0,0).formula() → we will see nullin V9 and If(true,1,2) in V11

    (or)

    1. go to any cell (for example 0,0 cell) and enter =max()
    2. go to console and execute sheet.hasFormula(0,0) → we will see false in V9 and true in V11
    3. go to console and execute sheet.getCell(0,0).formula() → we will see null in V9 and max() in V11

    Can you please tell us how to handle these differences? Is there a way to identify invalid formula?

    Thanks,

    Viswanath

    formula issues.zip

  • Posted 27 June 2018, 5:02 am EST

    Hello,

    We are able to replicate the issue and hence we are escalating the same to the concerned team for the fix.

    We will update you as soon as we hear anything from our concerned team.

    Tracking id for your issue is #260028

    Thanks,

    Reeva

  • Posted 27 June 2018, 7:28 am EST

    Thanks, an earliest response will be of great help.

  • Posted 27 June 2018, 11:35 pm EST

    Hello,

    We will update you as soon as we hear back from our concerned team.

    Thanks,

    Reeva

Need extra support?

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

Learn More

Forum Channels