Search bug

Posted by: christine-fp on 8 September 2017, 2:38 pm EST

  • Posted 8 September 2017, 2:38 pm EST

    hello,

    I am trying to use the Search method for finding an amount:

    found = fpSpreadTrans.Search(sheetIndex, searchString, caseSensitive, exactMatch, alternateSearch, useWildcards, _
     startRowIndex, startColumnIndex, endRowIndex, endColumnIndex, foundRowIndex, foundColumnIndex)

    the searchString in this case is a number in string format. I noticed that it can search just find for numbers ranging from -9,999,999.99 - 9,999,999.99, but anything above or below this amount it will come back as not found.

    Is this a known bug? Can somebody please look into this?

     

    Thanks! 

     

  • Replied 8 September 2017, 2:38 pm EST

    Hello,

     I am having no problem in finding a number as string where I am showing the number as a String in a cell.Also if I set the celltype and search the same number as string it is found by Search( ) method with no issues please have a look at the code below that I use :

            FpSpread1.ActiveSheet.Cells(1, 1).Text = "1000000000"

            Dim ct As New FarPoint.Win.Spread.CellType.NumberCellType

            ct.MaximumValue = 10000000000

            FpSpread1.ActiveSheet.Cells(1, 2).CellType = ct

            FpSpread1.ActiveSheet.Cells(1, 2).Value = 1000000000

    I use following code to search :

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

            Dim x As Integer

            Dim y As Integer

            FpSpread1.Search(0, "1000000000", False, False, False, True, 0, 0, 3, 3, x, y)

            ListBox1.Items.Add(x)

            ListBox1.Items.Add(y)

        End Sub

    First it gives 1 ,1 in list box and then 1,2 in listbox. If the issue persists could you please post a small sample application to debug this issue further.

    Thanks,

     

     

     

     

     

     

  • Replied 8 September 2017, 2:38 pm EST

    hello,

     I just wanted to mention this for future readers that setting the min and max values when declaring the NumberCellType does solve the issue.

     Thanks again! 

Need extra support?

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

Learn More

Forum Channels