I faced an issue while trying to recover a formula cell through ValueCache after saving the file through the workbook save method. Following are the steps to reproduce this issue:
1) Open the attached file
2) Its a simple file with the following values
A1 = 8
B1 = 6
C1 = A1 + B1 = 14
3) I use the following code snippet to open the file, read ValueCached from C1, change the value in A1 and save the file. So far its good and the ValueCached shows the correct value which is 14. Now when I run this second time, the ValueCached shows null
var wb = new XLWorkbook(@"c:\fincalc\simple.xlsx");
var ws = wb.Worksheet(1);
var c1 = ws.Cell("C1").ValueCached;
ws.Cell("A1").Value = "10";
wb.Save();
4) Also if I open the same file through excel and try to exit excel, it promts me to save the file even when I have not changed anything. Can you please let me know if the wb.Save() method is missing out something while saving the file?
Thanks in advance for your time.
1) Open the attached file
2) Its a simple file with the following values
A1 = 8
B1 = 6
C1 = A1 + B1 = 14
3) I use the following code snippet to open the file, read ValueCached from C1, change the value in A1 and save the file. So far its good and the ValueCached shows the correct value which is 14. Now when I run this second time, the ValueCached shows null
var wb = new XLWorkbook(@"c:\fincalc\simple.xlsx");
var ws = wb.Worksheet(1);
var c1 = ws.Cell("C1").ValueCached;
ws.Cell("A1").Value = "10";
wb.Save();
4) Also if I open the same file through excel and try to exit excel, it promts me to save the file even when I have not changed anything. Can you please let me know if the wb.Save() method is missing out something while saving the file?
Thanks in advance for your time.