# Javascript: TableCell.getCellFormat Method

> Gets the formatting attributes of a table cell. The property's value is an object of type TableCellFormat.

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

---

### Description

Gets the formatting attributes of a table cell. The property's value is an object of type [TableCellFormat](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellformat/llms-full.txt).

### Syntax

```javascript
<void> TableCell.getCellFormat(<RequestCellFormatCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the cell's format. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TableCell.getCellFormat` in a practical document-editing workflow. It gets the formatting attributes of a table cell. The property's value is an object of type TableCellFormat.

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

function inspectCellFormat(tableCell) {
    tableCell.getCellFormat(
        function(format) {
            if (!format) {
                console.warn("No table cell format was returned.");
                return;
            }
            
            console.log("get cell format result:", format);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [TableCell Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/llms-full.txt)
- **Next:** [Javascript: TableCell.getColumn Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/getcolumn-method/llms-full.txt)
