# Search Class

> Search class in the TX Sheet Control .NET API: Sparse workbook search and atomic replacement across inputs, formulas, values and displayed text.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Inherits:** `TXTextControl.TXSheetControl.Server.DocumentObject`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > Search Class
- **621 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/llms-full.txt

---

Sparse workbook search and atomic replacement across inputs, formulas, values and displayed text.

### Syntax

```csharp
public class Search
```

### Members

#### Methods

| Method | Description |
|---|---|
| [FindAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/findasync-method/llms-full.txt) | Returns stable worksheet/row-major matches; maxResults is bounded to protect large workbooks. |
| [ReplaceAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/replaceasync-method/llms-full.txt) | Replaces matching cells in one transaction; protection and validation are still enforced. |

### Examples

Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateSearchReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("A1").SetTextAsync("Consulting");

    var search = book.Search;
    await search.ReplaceAsync(new SearchOptions { Query = "Consulting", Target = "text" }, "Consulting services");
    return await control.SaveAsync(StreamType.PDF);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [Search.FindAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/findasync-method/llms-full.txt): Search.FindAsync method in the TX Sheet Control .NET API: Returns stable worksheet/row-major matches; maxResults is bounded to protect large workbooks.
- [Search.ReplaceAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/replaceasync-method/llms-full.txt): Search.ReplaceAsync method in the TX Sheet Control .NET API: Replaces matching cells in one transaction; protection and validation are still enforced.

---

## Nearby

- **Previous:** [SaveOptions.EmbedUsedFonts Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/saveoptions/embedusedfonts-property/llms-full.txt)
- **Next:** [Search.FindAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/search/findasync-method/llms-full.txt)
