# TableCellFormat.NumberFormat Property

> Gets or sets a number format for the table cell. It can be used to automatically format numbers in table cells. When a formula is defined the automatically calculated text can also be formatted with a number format. When a number format is not defined, the property's value is an empty string. The number format string has a format as described in Office Open XML File Formats - ISO/IEC 29500 - 1, Chapter: 18.8.31 Number Formats. See Formatting Text by using Number Formats for more information.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 26.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > TableCellFormat.NumberFormat Property
- **711 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecellformat/numberformat-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecellformat/numberformat-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecellformat/numberformat-property/llms-full.txt

---

### Description

Gets or sets a number format for the table cell. It can be used to automatically format numbers in table cells. When a formula is defined the automatically calculated text can also be formatted with a number format. When a number format is not defined, the property's value is an empty string. The number format string has a format as described in Office Open XML File Formats - ISO/IEC 29500 - 1, Chapter: 18.8.31 Number Formats. See Formatting Text by using Number Formats for more information.

### Syntax

```csharp
public string NumberFormat { get; set; }
```

```vbnet
Public Property NumberFormat As String
```

### Examples

The following example creates a small report table and works with its structure by using `TableCellFormat.NumberFormat`.

```csharp
textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableCellFormat tableCellFormat = table.Cells[1, 1].CellFormat;

tableCellFormat.NumberFormat = "0.00";
if (!string.IsNullOrWhiteSpace(tableCellFormat.NumberFormat))
{
    Console.WriteLine($"Number Format: {tableCellFormat.NumberFormat}");
}
```

```vbnet
textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableCellFormat As TableCellFormat = table.Cells(1, 1).CellFormat

tableCellFormat.NumberFormat = "0.00"
If Not String.IsNullOrWhiteSpace(tableCellFormat.NumberFormat) Then
    Console.WriteLine($"Number Format: {tableCellFormat.NumberFormat}")
End If
```

---

## Nearby

- **Previous:** [TableCellFormat.LeftTextDistance Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecellformat/lefttextdistance-property/llms-full.txt)
- **Next:** [TableCellFormat.RightBorderColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecellformat/rightbordercolor-property/llms-full.txt)
