How to recalculate

I just downloaded the Cells trial and am trying to figure out how to recalculate. I'm sure it can be done; I just can't figure out how and would appreciate your help.

Here is my VB.NET code. The formulas in the Excel spreadsheet use values from multiple cells as input. As a test, I'm trying to change the value in one of those input cells (Z13), then have the formulas recalculate the result (which is in cell G4). My program comments document my inability to get recalculate working.

'Opening an existing workbook.
Dim workbook As New Workbook("f:\temp\CAV GLI12(15) 06_10_13.xlsm")
' Accessing first worksheet. This spreadsheet has multiple worksheets. Only working with first tab,
' but the formulas reference other tabs.
Dim worksheet As Worksheet = workbook.Worksheets(0)
Dim cells As Cells = workbook.Worksheets(0).Cells
Dim cell As Cell = cells(0, 0)
Dim cav As Decimal = 0
Dim str As String = String.Empty
cell = cells("G4")
' Get CAV of current case (assumed to be case 1 for this test). This works fine.
cav = CDec(cell.DoubleValue)
' Change state from IN to CA
cell = cells("z13")
cell.PutValue("CA")
' Confirm the put worked
str = cell.StringValue
' Has CAV changed? (excel would recalculate automatically)
cell = cells("G4")
' No!
cav = CDec(cell.DoubleValue)
' try forcing recalculation
workbook.CalculateFormula()
' retrieve value again: #VALUE is returned!
str = cell.StringValue

Hi,


Thanks for your inquiry.

Please try our latest version/fix : Aspose.Cells for .NET v7.5.2 (if you are not already using it)

If you still find the issue, kindly post your template Excel file, we will check your issue soon.

Thank you.

Sorry for being slow, but how do I determine which release of Aspose Cells I have?

Hi,


Please see the document for your reference:


Thank you.