Spread ASP.NET 17
Spread for ASP.NET 17 Product Documentation / Developer's Guide / Customizing User Interaction / Customizing Interaction with the Overall Component / Searching for Data with Code
In This Topic
    Searching for Data with Code
    In This Topic

    To search for data in any of the cells of a sheet, use either of these sets of methods in the FpSpread class:

    The parameters of the various search methods allow you to specify the sheet to search, the string for which to search, and the matching criteria. For a list of qualifications (restrictions) of the search, refer to the set of methods listed above for more details.

    Using Code

    Use the Search method for the FpSpread component to perform a search.

    Example

    Use the Search method to perform an exact-match search on the third sheet (Sheet 2) for the word "Total" and return the values of the row index and column index of the found cell.

    C#
    Copy Code
    fpSpread1.Search(2,"Total",true,true,false,false,1,1,56,56,ref rowindx,ref colindx)); 
    
    VB
    Copy Code
    FpSpread1.Search(2,"Total",True,True,False,False,1,1,56,56,ref rowindx,ref colindx))