How to search cell's formula

Posted by: xgsoftware on 8 September 2017, 2:41 pm EST

  • Posted 8 September 2017, 2:41 pm EST

    Farpoint Spread for windows form  provide a search function like this:


    public SearchFoundFlags Search(
       int startSheetIndex,
       int endSheetIndex,
       string searchString,
       bool caseSensitive,
       bool exactMatch,
       bool alternateSearch,
       bool useWildcards,
       bool includeCellText,
       bool includeNotes,
       bool includeTags,
       int startRowIndex,
       int startColumnIndex,
       int endRowIndex,
       int endColumnIndex,
       ref int foundSheetIndex,
       ref int foundRowIndex,
       ref int foundColumnIndex

    however,this function can't search the cell's formula (if  the A1 Cell has a formul equals Sum(1,2)), I input the string "Sum", the search function can not search this formula, can anybody tell me how to search formula  or  can this spread search function provide additional parameter may like "bool includeFormula"


    best regards

  • Replied 8 September 2017, 2:41 pm EST

    Hello,

    Our Search method does not search for formulas. You would need to implement the search for formulas as follows

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Dim dataModel As FarPoint.Win.Spread.Model.DefaultSheetDataModel

            dataModel = FpSpread1.ActiveSheet.Models.Data

            Dim en As FarPoint.Win.Spread.Model.DefaultSheetDataModel.DefaultSheetDataModelEnumerator

            en = dataModel.EnumFormulas

            MsgBox(en.NextNonEmptyRow(-1))

     End Sub

     

    Thanks,

Need extra support?

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

Learn More

Forum Channels