# CellComments Class

> CellComments class in the TX Sheet Control JavaScript API for Node.js: Editable cell conversation; current user identity belongs to the owning workbook runtime.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > CellComments Class
- **954 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/llms-full.txt

---

Editable cell conversation; current user identity belongs to the owning workbook runtime.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Constructor

```javascript
new CellComments(sheet, address)
```

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `sheet` | `Worksheet` | No | Value matching sheet's declared type and the owning object's validation rules. |
| `address` | `string` | No | A1 cell address on the owning worksheet. |

Returns: `CellComments`.

### Members

#### Properties

| Property | Description |
|---|---|
| [address](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/address-property/llms-full.txt) | The address value of CellComments. |
| [sheet](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/sheet-property/llms-full.txt) | The sheet value of CellComments. |
| [thread](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/thread-property/llms-full.txt) | Returns a detached thread, or undefined for a cell without comments. |

#### Methods

| Method | Description |
|---|---|
| [add](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/add-method/llms-full.txt) | Starts a conversation or appends a reply using the current userName. |
| [edit](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/edit-method/llms-full.txt) | Edits an entry authored by the current user, retaining its original creation time. |
| [remove](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/remove-method/llms-full.txt) | Removes one of the current user's entries, or deletes the whole thread when id is omitted. |
| [resolve](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/resolve-method/llms-full.txt) | Resolves or reopens the conversation without altering its entries. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

```javascript
function createCellCommentsReport(control) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet.cell('A1').format({
        fontFamily: 'Liberation Sans',
        fontSize: 16,
        bold: true,
        textColor: '#ffffff',
        fillColor: '#163b63',
    });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });
    sheet.cell('B10').comments.add('Approved for sending.');
    sheet.cell('B10').comments.resolve();
    return sheet;
}
```

### See Also

- [JavaScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/llms-full.txt)
- [Comments, Notes and Hyperlinks](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/comments/llms-full.txt)

---

## In This Section

- [CellComments.add Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/add-method/llms-full.txt): CellComments.add method in the TX Sheet Control JavaScript API for Node.js: Starts a conversation or appends a reply using the current userName.
- [CellComments.address Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/address-property/llms-full.txt): CellComments.address property in the TX Sheet Control JavaScript API for Node.js, with its type string and a JavaScript example.
- [CellComments.edit Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/edit-method/llms-full.txt): CellComments.edit method in the TX Sheet Control JavaScript API for Node.js: Edits an entry authored by the current user, retaining its original creation time.
- [CellComments.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/remove-method/llms-full.txt): CellComments.remove method in the Node.js JavaScript API: Removes one of the current user's entries, or deletes the whole thread when id is omitted.
- [CellComments.resolve Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/resolve-method/llms-full.txt): CellComments.resolve method in the TX Sheet Control JavaScript API for Node.js: Resolves or reopens the conversation without altering its entries.
- [CellComments.sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/sheet-property/llms-full.txt): CellComments.sheet property in the TX Sheet Control JavaScript API for Node.js, with its type Worksheet and a JavaScript example.
- [CellComments.thread Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/thread-property/llms-full.txt): CellComments.thread property in the TX Sheet Control JavaScript API for Node.js: Returns a detached thread, or undefined for a cell without comments.

---

## Nearby

- **Previous:** [Cell.setBarcode Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cell/setbarcode-method/llms-full.txt)
- **Next:** [CellComments.add Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/cellcomments/add-method/llms-full.txt)
