# Range Class

> Range class in the TX Sheet Control .NET API: A worksheet-bound rectangular range for atomic reads, writes, formatting and copy operations.

- **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`
- **Derived:** `TXTextControl.TXSheetControl.Server.Cell`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > Range Class
- **1455 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/llms-full.txt

---

A worksheet-bound rectangular range for atomic reads, writes, formatting and copy operations.

### Syntax

```csharp
public class Range
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Address](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/address-property/llms-full.txt) |  |
| [Sheet](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/sheet-property/llms-full.txt) |  |

#### Methods

| Method | Description |
|---|---|
| [ClearAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/clearasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [CopyToAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/copytoasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [FillToAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/filltoasync-method/llms-full.txt) | Propagates formulas, formatting or inferred series from this seed into an extended A1 range. |
| [FormatAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/formatasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetBoundsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getboundsasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetColumnCountAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getcolumncountasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetRowCountAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getrowcountasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetValuesAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getvaluesasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [MergeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/mergeasync-method/llms-full.txt) | Merges application data into an isolated document snapshot before replacing the current workbook. |
| [ReadAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/readasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetFormulasAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setformulasasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetInputsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setinputsasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetValidationAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setvalidationasync-method/llms-full.txt) | Installs a validation rule on this range; subsequent edits are enforced atomically. |
| [SetValuesAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setvaluesasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [UnmergeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/unmergeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |

### 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[]> CreateRangeReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("B8").SetValueAsync(120);
    await sheet.Cell("B9").SetValueAsync(80);
    await sheet.Cell("B10").SetFormulaAsync("=SUM(B8:B9)");

    var range = sheet.Range("B8:B9");
    await range.FormatAsync(new { numberFormatCode = "#,##0.00", fontFamily = "Liberation Sans", fontSize = 11 });
    await range.FormatAsync(new { numberFormatCode = "ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ #,##0.00", fillColor = "#e5eef4", bold = true });
    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

- [Range.Address Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/address-property/llms-full.txt): Range.Address property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [Range.ClearAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/clearasync-method/llms-full.txt): Range.ClearAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.CopyToAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/copytoasync-method/llms-full.txt): Range.CopyToAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.FillToAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/filltoasync-method/llms-full.txt): Range.FillToAsync method in the TX Sheet Control .NET API: Propagates formulas, formatting or inferred series from this seed into an extended A1 range.
- [Range.FormatAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/formatasync-method/llms-full.txt): Range.FormatAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.GetBoundsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getboundsasync-method/llms-full.txt): Range.GetBoundsAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.GetColumnCountAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getcolumncountasync-method/llms-full.txt): Range.GetColumnCountAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.GetRowCountAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getrowcountasync-method/llms-full.txt): Range.GetRowCountAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.GetValuesAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/getvaluesasync-method/llms-full.txt): Range.GetValuesAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.MergeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/mergeasync-method/llms-full.txt): Range.MergeAsync method in the TX Sheet Control .NET API: Merges application data into an isolated document snapshot before replacing the current workbook.
- [Range.ReadAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/readasync-method/llms-full.txt): Range.ReadAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.SetFormulasAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setformulasasync-method/llms-full.txt): Range.SetFormulasAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.SetInputsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setinputsasync-method/llms-full.txt): Range.SetInputsAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.SetValidationAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setvalidationasync-method/llms-full.txt): Range.SetValidationAsync method in the TX Sheet Control .NET API: Installs a validation rule on this range; subsequent edits are enforced atomically.
- [Range.SetValuesAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/setvaluesasync-method/llms-full.txt): Range.SetValuesAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Range.Sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/sheet-property/llms-full.txt): Range.Sheet property in the TX Sheet Control .NET API, with its syntax, its type Worksheet, a C# example and remarks on awaiting tasks and handles.
- [Range.UnmergeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/unmergeasync-method/llms-full.txt): Range.UnmergeAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.

---

## Nearby

- **Previous:** [ProtectionOptions.Password Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/protectionoptions/password-property/llms-full.txt)
- **Next:** [Range.Address Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/range/address-property/llms-full.txt)
