I am trying to use the calculateAllValue() method, then read the cells where values should now be calculated from formulas, but it still returns the formulas instead of the values.
If I save to excel and open the file, the calculated values are correctly displayed.
Is there a way to really calculate the whole workbook, refreshing all values following changes to cell values/formulas, without having to save to excel file? This is exactly what we are trying to avoid, opening and closing excel files.
I used the WriteFormulas example from your samples, and added this after all the cell changes :
- Code: Select all
workbook.CalculateAllValue();
MessageBox.Show(sheet.Range[13, 2].Value);
It returns "=Count(3,5,8,10,2,34)"
Thank you.