# TableCell Object

> Represents a single cell of a table in a Text Control document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > TableCell Object
- **1066 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/llms-full.txt

---

### Description

Represents a single cell of a [table](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/table/llms-full.txt) in a Text Control document.

### Syntax

```javascript
TableCell
```

### Examples

The following example demonstrates `TableCell` in a practical document-editing workflow. It represents a single cell of a table in a Text Control document.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectTableCell(tableCell) {
    tableCell.getText(
        function(result) {
            console.log("get text result:", result);
        },
        onTxError
    );
}
```

---

## In This Section

- [Javascript: TableCell.getCellFormat Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getcellformat-method/llms-full.txt): Gets the formatting attributes of a table cell. The property's value is an object of type TableCellFormat.
- [Javascript: TableCell.getColumn Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getcolumn-method/llms-full.txt): Gets the table cell's column number.
- [Javascript: TableCell.getFormula Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getformula-method/llms-full.txt): Gets the table cell's formula. For each table cell a formula can be defined which is used to calculate the cell's text. The formula can contain references to other table cells in the same table. When the text of a referenced cell changes, the cell which references it is automatically updated.
- [Javascript: TableCell.getLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getlength-method/llms-full.txt): Gets the number of characters in the table cell. If the table cell is merged, the property returns -1.
- [Javascript: TableCell.getName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getname-method/llms-full.txt): Gets the cell's name. Each table cell can have a name, which can be used to store any string data associated with the cell.
- [Javascript: TableCell.getPosition Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getposition-method/llms-full.txt): Gets, in twips, the horizontal position of the cell.
- [Javascript: TableCell.getRow Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getrow-method/llms-full.txt): Gets the table cell's row number.
- [Javascript: TableCell.getStart Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getstart-method/llms-full.txt): Gets the index (one-based) of the first character in the table cell.
- [Javascript: TableCell.getText Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/gettext-method/llms-full.txt): Gets the cell's text.
- [Javascript: TableCell.getWidth Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getwidth-method/llms-full.txt): Gets, in twips, the width of the cell.
- [Javascript: TableCell.select Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/select-method/llms-full.txt): Selects the table cell.
- [Javascript: TableCell.setFormula Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/setformula-method/llms-full.txt): Sets the table cell's formula. For each table cell a formula can be defined which is used to calculate the cell's text. The formula can contain references to other table cells in the same table. When the text of a referenced cell changes, the cell which references it is automatically updated.
- [Javascript: TableCell.setName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/setname-method/llms-full.txt): Sets the cell's name. Each table cell can have a name, which can be used to store any string data associated with the cell.
- [Javascript: TableCell.setPosition Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/setposition-method/llms-full.txt): Sets, in twips, the horizontal position of the cell.
- [Javascript: TableCell.setText Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/settext-method/llms-full.txt): Sets the cell's text.
- [Javascript: TableCell.setWidth Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/setwidth-method/llms-full.txt): Sets, in twips, the width of the cell.

---

## Nearby

- **Previous:** [TableCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecallback/llms-full.txt)
- **Next:** [Javascript: TableCell.getCellFormat Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getcellformat-method/llms-full.txt)
