Using formula like "A#"

Posted by: abiram01 on 8 September 2017, 1:04 pm EST

  • Posted 8 September 2017, 1:04 pm EST


    Hi All,


    Currently am wokring on converstion project ie from VB 6.0 to VB.Net 2005. In Spread control for Vb the below formaulae are assigned this way:


    ss_FarPoint.Formula = "(A# * B#)"


    ss_FarPoint.Formula = "SUM(#1:#" & CStr(MAX_ROWS - 1) & ")".


    When i assigend the same way for VB.Net using Far Point Spread Controls for Windows V 3.0, A error message "Invalid Token" is displayed. Please let me know how to implement the similar formula in VB.Net


    Regards,


    Abhi

  • Replied 8 September 2017, 1:04 pm EST

    See the following post for an explanation of this...

    http://www.clubfarpoint.com/Forums/forums/thread/51907.aspx
  • Replied 8 September 2017, 1:04 pm EST

    Thank you Bob.


    The method that is displayed in the above link is working fine. However the formula cell is displaying 0 if there is no data for eg if there is no data in A5, A6, A7 then A10 should be blank and not 0. Please let me know how to do this.


    Regards,
    Abhi


     


     

  • Replied 8 September 2017, 1:04 pm EST

    Abhi -

    Do a search in the WindowsForms Formula's section with the keyword 'null' to see many explanations for this.  Here's one to get you started...
    http://www.clubfarpoint.com/Forums/forums/post/2563.aspx
  • Replied 8 September 2017, 1:04 pm EST


    hi,


    As there are only 5 rows for which I need to set the formula, I am doing this way:


    Fpspread.ActiveSheet.Cells(0, COL_TOTAL).Formula = "(A1 * B1)"


    Fpspread1.ActiveSheet.Cells(1, COL_TOTAL).Formula = "(A2 * B2)"


    Fpspread1.ActiveSheet.Cells(2, COL_TOTAL).Formula = "(A3 * B3)"


    Fpspread1.ActiveSheet.Cells(3, COL_TOTAL).Formula = "(A4 * B4)"


    Fpspread1.ActiveSheet.Cells(4, COL_TOTAL).Formula = "(A5 * B5)"


    formula for the first row is setting and for rest of the rows its not. please let me know what should be done to set the formual.


     


    Regards,


    Abhi


     

  • Replied 8 September 2017, 1:04 pm EST

    Without seeing what you are doing in your project I can't tell why the formulas would not be working.  What results are you getting?  Can you provide an example?
Need extra support?

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

Learn More

Forum Channels