Modifying SfSpreadsheet Breaks the Sheet

I am having an issue with the SfSpreadsheet where it seems attempting to modify values in the spreadsheet ends up breaking all of the formulas.  I am using an existing spreadsheet as a template and then injecting formulas and data into the SfSpreadsheet control, that appears to work well (Picture #1).

However, when I change values that are used to make calculations (for example "Interest Rate During Retirement") then I end up with garbage data (Picture #2), seemingly because the control is no longer handling the formulas even though they still appear to be correct.

Once the control is loaded, I save it off as an actual spreadsheet (New.xlsx) and when I change the same values in that spreadsheet, everything is working as intended; meaning, it appears what I have created works correctly but the SfSpreadsheet control for one reason or another does not handle user input changes very well.


Attachment: SfSpreadsheet_337e2f4e.zip

7 Replies

SC Scott August 16, 2021 10:09 PM UTC

More information. I decided to try a little experiment so instead of loading my "template" I loaded the "New.xlsx" file that I previously included in the zip of my first post.  That file was essentially created by the SfSpreadsheet control.  All I did was load the file (I disabled all of my code that injects data and formulas) and then attempt to change the  "Interest Rate During Retirement" amount.

The code blew up with a stackoverflow exception, since I do not have your source code I can' really provide much.  I have attached a screen shot of what I have but there isn't much to go on.  I would think that you can reproduce this by simply loading the "New.xsls" spreadsheet I provided previously into an SfSpreadsheet control.


It appears this is blowing up in "compareinfo.cs" but I do not get any exceptions when I run my application normally using my template spreadsh


Attachment: StackOverFlowException_b4007e14.zip


BT Balamurugan Thirumalaikumar Syncfusion Team August 18, 2021 05:04 AM UTC

Hi Scott,


Thank you for contacting Syncfusion support.


We could reproduce the reported “StackOverFlowException” while modifying the existing spreadsheet. We have forwarded this query to our development team for further validation. We will provide you the proper validation details on August 19,2021. We appreciate your patience till then.


Balamurugan Thirumalaikumar





BT Balamurugan Thirumalaikumar Syncfusion Team August 19, 2021 01:44 PM UTC

Hi Scott, 

Thank you for your patience. 

We have checked the reported scenario with provided Excel sheet at out end. Only by changing the “Interest Rate During Retirement” and “Inflation rate” percentage values can we get the reported stackoverflow exception. However, when we just import two cells(E6,E7) and modify the sheet, we don't get the exception; it only happens when we import the entire sheet. Could you please tell us what you did in the cells E6(rate), E7(Inflation) or please refer the following sample get back us with the exact replication procedure for that cell details which will help us to check further and provide you the earliest solution.  


Balamurugan Thirumalaikumar  




SC Scott August 19, 2021 02:33 PM UTC

I have moved in a slightly different direction since I assumed this might take a while to diagnose and/or fix, however, it would still be good to continue looking into this.  I have attached a document to explain the process so hopefully it helps clear things up.

Thanks,

Scott


Attachment: ModifyingSfSpreadsheetBreaksTheSheet_92580d47.zip


BT Balamurugan Thirumalaikumar Syncfusion Team August 20, 2021 01:29 PM UTC

Hi Sabari, 

Thank you for the update. 

We could understand the reported scenario at our end. We are validating this with high priority. We are in need of some more time to validate this properly. We will check and update with further details on August 24, 2021. We appreciate your patience and understanding. 

Balamurugan Thirumalaikumar  




BT Balamurugan Thirumalaikumar Syncfusion Team August 24, 2021 03:36 PM UTC

Hi Scott,

We deeply regret for the inconvenience caused.

Still we are checking the cause for the reported scenario. We need some more time to check the further and we will validate and update you the proper details on August 26, 2021. We appreciate patience and understandings till then.

Thanks & Regards,
Balamurugan Thirumalaikumar


BT Balamurugan Thirumalaikumar Syncfusion Team August 26, 2021 03:31 PM UTC

Hi Scott, 
 
Thank you for your patience. 
 
StackOverflow exception occurs when the number of IterationMaxCount, MaximumRecursiveCalls and MaxStackDepth exceeds in the CalcEngine. To avoid this StackOverflow exception while computing the formulas iteratively exceeding the maximum capacity, you need to set the values for these properties before calling the Calculate method of IWorksheet interface. To avoid the exception you can refer the following documentation and Forum for your reference. 
 
 
 
Please let us know if you would require any other assistance. we will be happy to assist you. 
 
Balamurugan Thirumalaikumar  
 


Loader.
Up arrow icon