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. Image for the cookie policy date
close icon

newbie: not calculating functions

i created an excel workbook with 3 spreadsheets (inputs, calculate, outputs). There''s only one calculation - the sum of three inputs. I copied and pasted the sample code for the ExcelRWCalcWorkbook into my vb.net solution. I created a simple windows form GUI. I can see the values entered into the GUI being read into the spreadsheet correctly, but the calculations are not running, I''m not getting a calculated result. If I put in default values, the returned result is just the default total. Any ideas as to why the calculations are not being performed? There are no intermediate calcs. Thanks!

1 Reply

AD Administrator Syncfusion Team December 10, 2004 08:00 AM UTC

Our CarIns sample attempts more or less the same thing. Does that sample work for you? Here is the main code from that sample.
Private calcWB As ExceRWCalcWorkbook

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
     calcWB = ExceRWCalcWorkbook.CreateFromXLS("..\..\CarIns.xls")
     Me.calcWB.Engine.lockDependencies = False
     Me.calcWB.CalculateAll()
     Me.calcWB.Engine.lockDependencies = True

     ''.....

End Sub ''Form1_Load
Once this is done, that sample retrieves a computed value after changing inputs by indexing the sheet, calcWB("Outputs")(1, 1). If you can upload a sample showing the problem, or if you open a Direct Trac support incident and upload a sample there. we can try to spot the problem.

Loader.
Live Chat Icon For mobile
Up arrow icon