# Javascript: Table.cells Property

> The collection of all table cells the table consists of.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Table.cells Property
- **344 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/cells-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/cells-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/cells-property/llms-full.txt

---

### Description

The collection of all table cells the table consists of.

### Syntax

```javascript
<TableCellCollection> Table.cells
```

### Examples

The following example enumerates every cell in the current table and reports its non-empty text.

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

TXTextControl.textParts.getMainText(function(mainText) {
    mainText.tables.getItem(function(table) {
        if (!table) {
            console.warn("Place the input position in a table.");
            return;
        }

        table.cells.forEach(function(cell) {
            cell.getText(function(text) {
                if (text.trim().length > 0) {
                    console.log("Cell text:", text);
                }
            }, onTxError);
        }, onTxError);
    }, onTxError);
}, onTxError);
```

### Limitations

Read Only.

---

## Nearby

- **Previous:** [Table Object](https://docs.textcontrol.com/ds-server/reference/javascript/table/llms-full.txt)
- **Next:** [Javascript: Table.columns Property](https://docs.textcontrol.com/ds-server/reference/javascript/table/columns-property/llms-full.txt)
