To search for data in any of the cells of a sheet, use either of these sets of methods in the FpSpread class:
- Search methods
- SearchHeaders methods
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.
Return to the overview of Customizing Interaction with the Overall Component.
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)) |