AllowUserFormulas set to false from FormulaTextBox use

Posted by: greygranite on 8 September 2017, 2:14 pm EST

  • Posted 8 September 2017, 2:14 pm EST

    AllowUserFormulas set to false from FormulaTextBox use

    Hello,

    Found an issue were AllowUserFormulas is set to false after the formulaTextBox has changes made to its data and enter is pressed, committing the data to the sheet.  When the sheet was loaded, the AllowUserFormulas property is true.  Please see the attached .net 2008 project and use the following steps to reproduce. 

    Steps to Reproduce:

    1. Click on cell A2
    2. Type 123
    3. Press Enter
    4. Click on cell B2
    5. Type =A2*2
    6. Press Enter
    7. Double Click on cell A2
    8. Click on formulaTextBox
    9. Type 0 between 2 and 3
    10. Press Enter
    11. Click on cell B2
    12. Type =

    At this point the formula editor will not open for the cell.  The Spreadsheet will not respond to the equal sign.  If you save off the xml of the spreadsheet, you will see that the spread property "AllowUserFormulas" has been set to false.  Also, a message box will popup when the property is changed to false.

    Since my spreadsheets will always have AllowUserFormulas set to true, the work around is to sit on the fpSpread_Change event and check for AllowUserFormulas = false.  When this occurs, then change this property back to true.

    Version of Farpoint used:
    FarPoint.CalcEngine 4.0.2012.2005
    FarPoint.Win  4.0.2009.2005
    FarPoint.Win.Spread  4.0.2009.2005


    Thanks,

    Ed Ostrowski

    2010/03/FP_CopyPaste20100304.zip
  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    I am able to replicate the issue using your sample, but not with a fresh sample application.Are you able to get this behavior with a new application using the same version of Spread?

    I used the following code and it seems to be working fine. AllowUserFormulas is not resetting to its  default value.

            FpSpread1.AllowUserFormulas = True
            Dim num, num1 As New FarPoint.Win.Spread.CellType.NumberCellType
            FpSpread1.ActiveSheet.Cells(0, 0).CellType = num
            FormulaTextBox1.Attach(FpSpread1)
            FpSpread1.ActiveSheet.Cells(0, 1).CellType = num1

    I am further investigating your code to find out the reason for this behavior.

    Thanks,

     

     

  • Replied 8 September 2017, 2:14 pm EST

    Created a new .net 2008 project with the same result.  Followed your example with the auto creation of the spreadsheet.

    Please see the attached project.

     

    Thanks,

     Ed Ostrowski


    2010/03/Fp_AllowUserFormulas20100305.zip
  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    I am not able to replicate the issue with the latest available build Spread version 4 (4.0.2015.2005) using the sample provided by you .I would request you to please test the same with the latest available build and let us know your observations.

    Thanks,

     

  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    I have submitted the above shown behavior(using your sample project) as a bug to our QA team for further investigation.I will inform you once I get to know about any fix/workaround/cause.

    Bug Id: 99914825

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels