# Cell Class

> Cell class in the TX Sheet Control .NET API: A worksheet-bound cell handle separating literal text, formulas, values, formatting and pictures.

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

---

A worksheet-bound cell handle separating literal text, formulas, values, formatting and pictures.

### Syntax

```csharp
public class Cell
```

### Members

#### Properties

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

#### Methods

| Method | Description |
|---|---|
| [FormatTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/formattextasync-method/llms-full.txt) | Zero-based UTF-16 string offsets; applies only to literal text. |
| [GetCellTypeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getcelltypeasync-method/llms-full.txt) | Reads the detached interactive cell configuration. |
| [GetDisplayStyleAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getdisplaystyleasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetDisplayTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getdisplaytextasync-method/llms-full.txt) | Reads visible cell text using the server document's locale and number format. |
| [GetFormulaAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getformulaasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetHyperlinkAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/gethyperlinkasync-method/llms-full.txt) | Reads the detached safe hyperlink target and optional display metadata. |
| [GetInputAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getinputasync-method/llms-full.txt) | Reads the entered cell content independently of number formatting and calculation. |
| [GetNoteAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getnoteasync-method/llms-full.txt) | Reads the detached legacy note, or null when absent. |
| [GetPictureAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getpictureasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetRichTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getrichtextasync-method/llms-full.txt) | Reads detached text runs whose omitted font properties inherit the cell style. |
| [GetStyleAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getstyleasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetValueAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getvalueasync-method/llms-full.txt) | Reads the calculated typed scalar from the owning worksheet. |
| [RemovePictureAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/removepictureasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetCellTypeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setcelltypeasync-method/llms-full.txt) | Sets or clears portable interactive-cell settings, retaining content and existing formatting. |
| [SetFormulaAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setformulaasync-method/llms-full.txt) | Writes an explicit formula; the leading equals sign is required. |
| [SetHyperlinkAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/sethyperlinkasync-method/llms-full.txt) | Sets or removes a hyperlink; unsafe URL schemes are rejected by the shared model. |
| [SetInputAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setinputasync-method/llms-full.txt) | Parses entered content using the same input rules as the JavaScript editor. |
| [SetNoteAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setnoteasync-method/llms-full.txt) | Writes or clears a legacy note using the current userName as its author. |
| [SetNoteBoundsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setnoteboundsasync-method/llms-full.txt) | Sets or clears the existing note's unzoomed bounds in one undoable operation, preserving its author and text. |
| [SetPictureAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setpictureasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetRichTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setrichtextasync-method/llms-full.txt) | Replaces the cell value with literal text runs; strings are never parsed as formulas. |
| [SetTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/settextasync-method/llms-full.txt) | Writes literal text, preserving leading zeros and leading equals signs. |
| [SetValueAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setvalueasync-method/llms-full.txt) | Writes a literal JSON scalar without parsing string values as formulas. |

### 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[]> CreateCellReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var title = sheet.Cell("A1");
    await title.SetTextAsync("October invoice");
    await title.FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    await sheet.Columns.At(0).SetWidthAsync(new { pixels = 240 });
    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)
- [GetBarcodeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getbarcodeasync-method/llms-full.txt) — Reads detached settings, or null when the cell has no barcode.
- [SetBarcodeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setbarcodeasync-method/llms-full.txt) — Sets a barcode while retaining the cell value or formula. Pass null to remove only the barcode.

---

## In This Section

- [Cell.Comments Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/comments-property/llms-full.txt): Cell.Comments property in the TX Sheet Control .NET API, with its syntax, its type Comments, a C# example and remarks on awaiting tasks and handles.
- [Cell.FormatTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/formattextasync-method/llms-full.txt): Cell.FormatTextAsync method in the TX Sheet Control .NET API: Zero-based UTF-16 string offsets; applies only to literal text.
- [Cell.GetBarcodeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getbarcodeasync-method/llms-full.txt): Cell.GetBarcodeAsync method in the TX Sheet Control .NET API: Reads detached settings, or null when the cell has no barcode.
- [Cell.GetCellTypeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getcelltypeasync-method/llms-full.txt): Cell.GetCellTypeAsync method in the TX Sheet Control .NET API: Reads the detached interactive cell configuration. Includes the syntax and a C# example.
- [Cell.GetDisplayStyleAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getdisplaystyleasync-method/llms-full.txt): Cell.GetDisplayStyleAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.GetDisplayTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getdisplaytextasync-method/llms-full.txt): Cell.GetDisplayTextAsync method in the TX Sheet Control .NET API: Reads visible cell text using the server document's locale and number format.
- [Cell.GetFormulaAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getformulaasync-method/llms-full.txt): Cell.GetFormulaAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.GetHyperlinkAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/gethyperlinkasync-method/llms-full.txt): Cell.GetHyperlinkAsync method in the TX Sheet Control .NET API: Reads the detached safe hyperlink target and optional display metadata.
- [Cell.GetInputAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getinputasync-method/llms-full.txt): Cell.GetInputAsync method in the TX Sheet Control .NET API: Reads the entered cell content independently of number formatting and calculation.
- [Cell.GetNoteAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getnoteasync-method/llms-full.txt): Cell.GetNoteAsync method in the TX Sheet Control .NET API: Reads the detached legacy note, or null when absent. Includes the syntax and a C# example.
- [Cell.GetPictureAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getpictureasync-method/llms-full.txt): Cell.GetPictureAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.GetRichTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getrichtextasync-method/llms-full.txt): Cell.GetRichTextAsync method in the TX Sheet Control .NET API: Reads detached text runs whose omitted font properties inherit the cell style.
- [Cell.GetStyleAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getstyleasync-method/llms-full.txt): Cell.GetStyleAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.GetValueAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/getvalueasync-method/llms-full.txt): Cell.GetValueAsync method in the TX Sheet Control .NET API: Reads the calculated typed scalar from the owning worksheet.
- [Cell.RemovePictureAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/removepictureasync-method/llms-full.txt): Cell.RemovePictureAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.SetBarcodeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setbarcodeasync-method/llms-full.txt): Cell.SetBarcodeAsync method in the TX Sheet Control .NET API: Sets a barcode while retaining the cell value or formula. Pass null to remove only the barcode.
- [Cell.SetCellTypeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setcelltypeasync-method/llms-full.txt): Cell.SetCellTypeAsync method in the TX Sheet Control .NET API: Sets or clears portable interactive-cell settings, retaining content and existing formatting.
- [Cell.SetFormulaAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setformulaasync-method/llms-full.txt): Cell.SetFormulaAsync method in the TX Sheet Control .NET API: Writes an explicit formula; the leading equals sign is required.
- [Cell.SetHyperlinkAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/sethyperlinkasync-method/llms-full.txt): Cell.SetHyperlinkAsync method in the TX Sheet Control .NET API: Sets or removes a hyperlink; unsafe URL schemes are rejected by the shared model.
- [Cell.SetInputAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setinputasync-method/llms-full.txt): Cell.SetInputAsync method in the TX Sheet Control .NET API: Parses entered content using the same input rules as the JavaScript editor.
- [Cell.SetNoteAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setnoteasync-method/llms-full.txt): Cell.SetNoteAsync method in the TX Sheet Control .NET API: Writes or clears a legacy note using the current userName as its author.
- [Cell.SetNoteBoundsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setnoteboundsasync-method/llms-full.txt): Cell.SetNoteBoundsAsync method in the .NET API: Sets or clears the existing note's unzoomed bounds in one undoable operation, preserving its author and text.
- [Cell.SetPictureAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setpictureasync-method/llms-full.txt): Cell.SetPictureAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Cell.SetRichTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setrichtextasync-method/llms-full.txt): Cell.SetRichTextAsync method in the TX Sheet Control .NET API: Replaces the cell value with literal text runs; strings are never parsed as formulas.
- [Cell.SetTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/settextasync-method/llms-full.txt): Cell.SetTextAsync method in the TX Sheet Control .NET API: Writes literal text, preserving leading zeros and leading equals signs.
- [Cell.SetValueAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/setvalueasync-method/llms-full.txt): Cell.SetValueAsync method in the TX Sheet Control .NET API: Writes a literal JSON scalar without parsing string values as formulas.

---

## Nearby

- **Previous:** [Calculation.SetExternalWorkbookAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/calculation/setexternalworkbookasync-method/llms-full.txt)
- **Next:** [Cell.Comments Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/cell/comments-property/llms-full.txt)
