# Searching for Data with Code

Spread for ASP.NET provides you several methods to search for data in any of the cells of a spreadsheet. Learn more in documentation.

## Content

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

* [Search](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.Search.html) methods
* [SearchHeaders](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.SearchHeaders.html) 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.

## Using Code

Use the [Search](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.Search.html) 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.

```csharp
fpSpread1.Search(2,"Total",true,true,false,false,1,1,56,56,ref rowindx,ref colindx));
```

```vbnet
FpSpread1.Search(2,"Total",True,True,False,False,1,1,56,56,ref rowindx,ref colindx))
```