Search bug

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

  • Posted 8 September 2017, 2:38 pm EST

    <p>hello,</p><p>I am trying to use the Search method for finding an amount:<br><br></p><p>found = fpSpreadTrans.Search(sheetIndex, searchString, caseSensitive, exactMatch, alternateSearch, useWildcards, _<br><span class="Apple-tab-span" style="white-space:pre;"> </span> startRowIndex, startColumnIndex, endRowIndex, endColumnIndex, foundRowIndex, foundColumnIndex)</p><p>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. </p><p>Is this a known bug? Can somebody please look into this?</p><p> </p><p>Thanks! </p><p></p><p> </p>
  • Replied 8 September 2017, 2:38 pm EST

    <p>Hello,</p><p> 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 :</p><p>        FpSpread1.ActiveSheet.Cells(1, 1).Text = "1000000000"</p><p>        Dim ct As New FarPoint.Win.Spread.CellType.NumberCellType
    <br>        ct.MaximumValue = 10000000000
    <br>        FpSpread1.ActiveSheet.Cells(1, 2).CellType = ct
    <br>        FpSpread1.ActiveSheet.Cells(1, 2).Value = 1000000000 </p><p>I use following code to search :</p><p> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    <br>        Dim x As Integer
    <br>        Dim y As Integer
    <br>        FpSpread1.Search(0, "1000000000", False, False, False, True, 0, 0, 3, 3, x, y)
    <br>        ListBox1.Items.Add(x)
    <br>        ListBox1.Items.Add(y)
    <br>    End Sub </p><p>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.<br></p><p>Thanks,</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>
  • Replied 8 September 2017, 2:38 pm EST

    <p>hello,</p><p> I just wanted to mention this for future readers that setting the min and max values when declaring the NumberCellType does solve the issue.</p><p> Thanks again! </p>
Need extra support?

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

Learn More

Forum Channels