We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

values in formulas are not updated and save error

Thread ID:

Created:

Updated:

Platform:

Replies:

149843 Dec 11,2019 12:35 PM UTC Dec 12,2019 12:08 PM UTC ASP.NET Core - EJ 2 1
loading
Tags: XlsIO
Manolo Capdevila
Asked On December 11, 2019 12:35 PM UTC

Hi,

I've an excel with formulas, and I've two problems

1. When I insert data in cell, formulas values are not updated
2. When I close de worksheet saving, the worksheet is not saved

I attach an example. In the example, if I set SI value in B2 cell, B9 cell has 100 value, else 500.

So, in the code, I set SI value, but the B9 value is 500 not 100.

Also, if I do workbook.save(true) (Close the workbook and save) B2 cell is empty, but if I save with other filename, B2 has SI value




Attachment: WebApplication5_aa908199.zip

Konduru Keerthi Konduru Ravichandra Raju [Syncfusion]
Replied On December 12, 2019 12:08 PM UTC

Hi Manalo, 

Greetings from Syncfusion. 

Query 
Answer 
1. When I insert data in cell, formulas values are not updated 
From the project you have shared us, we found that you are trying to access FormulaStringValue and hence the formula values are not updated. 

We suggest you to use CalculatedValue to get the updated formula values. 

Code Snippet: 

string value; 
value = sheet.Range["B9"].CalculatedValue; 

We have modified the sample for your reference and the sample can be downloaded from the following link. 

2. When I close de worksheet saving, the worksheet is not saved 
Also, if I do workbook.save(true) (Close the workbook and save) B2 cell is empty, but if I save with other filename, B2 has SI value 

Currently, we do not have support for workbook.Save() in ASP.NET Core. So, while closing the workbook by passing true (workbook.Close(true)) won’t save the workbook. 

We suggest you to save the document using workbook.SaveAs() method to resolve the issue. 

Regards, 
Keerthi. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon