SpreadJs V10.2: How to detect Circular references

Posted by: Hasitha.Gunasinghe on 29 May 2018, 7:10 pm EST

    • Post Options:
    • Link

    Posted 29 May 2018, 7:10 pm EST

    Hi,

    Is there a way to detect circular references on SpreadJS? Application users are able to add formulas on the loaded ssJson file and if they add a circular references, I want to detect it and throw a message.

    Thanks

    Hasitha

  • Posted 31 May 2018, 4:31 am EST

    Hi Hasitha,

    I have asked the development team about the same. I will let you know as soon as I get an update on this. The bug id for this issue is 258985.

    Thanks,

    Deepak Sharma

  • Posted 13 June 2018, 2:58 am EST

    Hello,

    This feature is on our feature enhancements list, it may get added in next major version of SpreadJS.

    Thanks,

    Deepak Sharma

  • Posted 18 December 2019, 8:52 pm EST

    Hi Any update on this feature. I am on v12. Is this feature available now?

  • Posted 19 December 2019, 1:11 am EST

    Hi Dattathreya,

    Could you please explain what is your actual requirement? Are you looking for an options for enabling iterative calculations like excel(File → options → formulas → Enable iterative calculation) or are you facing some issues with the circular formulas in SpreadJS. If yes, could you please provide some more details about the issue or a sample excel file.

    Regards

    Sharad

  • Posted 19 December 2019, 2:30 am EST

    Hi Sharad I am facing issue with circular references. My requirement is circular references should give similar results compared to excel. Currently I am not getting same result for circular reference compared to excel evaluation. This might be because of iteration count I am not sure. In excel I have set iteration count to 100.

    Try below scenario

    A1 = B1

    B1= C1

    C1 =A1 +1

    For above circular reference spreadJS gives value of 1000 for A1, B1 & C1 whereas excel gives value A1 → 49, B1 → 50,C1 ->50.

    1. Users in our app might enter circular references so I want to understand how spreadJS resolves circular dependency and how can I make it consistent with excel output
    2. If SpreadJS can’t compute circular refs like Excel then I want to know if there is a an API to detect circular referecences so that I can do validation to prevent users from uploading file with circular references
  • Posted 19 December 2019, 5:49 am EST

    Actually we need an api which returns true if there are circular references in workbook. Are there any apis available currently

  • Posted 20 December 2019, 1:01 am EST

    This might be because of the iteration count

    Yes, you are right. We already have in our backlog(SJS-1592) to support excel-like iteration count. I’ve added you as a correspondent for the case and will let you know about any updates regarding the same.

    Actually we need an api which returns true if there are circular references in workbook. Are there any apis available currently

    In V13, we added the Formula Auditing feature, so you may use this feature to detect circular dependencies. Please refer to the following doc:

    https://www.grapecity.com/spreadjs/docs/v13/online/formula-auditing.html

Need extra support?

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

Learn More

Forum Channels