Formula setting.

Posted by: caoweidehao on 8 September 2017, 1:01 pm EST

  • Posted 8 September 2017, 1:01 pm EST

    when the Spread column has been setted by one formula,it will autocalc to the result.

    I hope that it will autocalc until the cell's value changed

    For example,

    <SPAN class=kwd>Me</SPAN>.FpSpread1.ActiveSheet.Columns(2).Formula = <SPAN class=st>"A1+B1"</SPAN>
    <SPAN class=kwd>Me</SPAN>.FpSpread1.ActiveSheet.Cells(0, 0).Value = 1
    <SPAN class=kwd>Me</SPAN>.FpSpread1.ActiveSheet.Cells(0, 1).Value = 1
    <SPAN class=kwd>Me</SPAN>.FpSpread1.ActiveSheet.Cells(0, 2).Value = 3

     when form is loaded,the Cells(0, 2)'s value is 3 not 2.but when the Cells(0, 0) or   Cells(0, 1) has been changed(edit) , Cells(0, 2)'s value also is changed.

    More,when I  used AutoCalculation property,the whole column's value had been refreshed.

  • Replied 8 September 2017, 1:01 pm EST

    Using the following code I am not seeing this behavior...

    Me.FpSpread1.ActiveSheet.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1
    Me.FpSpread1.ActiveSheet.AutoCalculation = True
    Me.FpSpread1.ActiveSheet.Columns(2).Formula = "A1+B1"
    Me.FpSpread1.ActiveSheet.Cells(0, 0).Value = 1
    Me.FpSpread1.ActiveSheet.Cells(0, 1).Value = 1
    Me.FpSpread1.ActiveSheet.Cells(0, 2).Value = 3

    Make sure you have the latest maintenance release for the version you are using. 
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels