Using formula like "A#"

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

  • Posted 8 September 2017, 1:04 pm EST

    <FONT color=#008000 size=2>

    <FONT color=#000000>Hi All,</FONT>


    <FONT color=#000000>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:</FONT>


    <FONT color=#000000>ss_FarPoint.Formula = "(A# * B#)"</FONT>

    <FONT size=2>

    <FONT color=#000000>ss_FarPoint.Formula = "SUM(#1:#"</FONT></FONT><FONT color=#000000><FONT size=2> & </FONT><FONT size=2>CStr</FONT><FONT size=2>(MAX_ROWS - 1) & </FONT></FONT><FONT color=#000000 size=2>")".
    </FONT><FONT size=2></FONT>


    <FONT color=#000000 size=2>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 </FONT>


    <FONT color=#000000 size=2>Regards,</FONT>


    <FONT color=#800000 size=2><FONT color=#000000>Abhi</FONT>

    </FONT></FONT>
  • 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

    <FONT size=2>

    <FONT color=#000000>hi,</FONT>


    <FONT color=#000000>As there are only 5 rows for which I need to set the formula, I am doing this way: </FONT>


    <FONT color=#000000>Fpspread.ActiveSheet.Cells(0, COL_TOTAL).Formula = </FONT></FONT><FONT size=2><FONT color=#000000>"(A1 * B1)"</FONT>

    </FONT><FONT size=2>

    <FONT color=#000000>Fpspread1.ActiveSheet.Cells(1, COL_TOTAL).Formula = </FONT></FONT><FONT size=2><FONT color=#000000>"(A2 * B2)"</FONT>

    </FONT><FONT size=2>

    <FONT color=#000000>Fpspread1.ActiveSheet.Cells(2, COL_TOTAL).Formula = </FONT></FONT><FONT size=2><FONT color=#000000>"(A3 * B3)"</FONT>

    </FONT><FONT size=2>

    <FONT color=#000000>Fpspread1.ActiveSheet.Cells(3, COL_TOTAL).Formula = </FONT></FONT><FONT size=2><FONT color=#000000>"(A4 * B4)"</FONT>

    </FONT><FONT size=2>

    <FONT color=#000000>Fpspread1.ActiveSheet.Cells(4, COL_TOTAL).Formula = </FONT></FONT><FONT color=#000000 size=2>"(A5 * B5)"</FONT>


    <FONT color=#000000 size=2>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.</FONT>


    <FONT color=#000000 size=2></FONT> 


    <FONT color=#000000 size=2>Regards,</FONT>


    <FONT color=#000000 size=2>Abhi</FONT>


    <FONT color=#800000 size=2> 

    </FONT>
  • 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