# CellComments Class

> CellComments class in the TX Sheet Control TypeScript API for the browser: Editable cell conversation. Includes the syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > CellComments Class
- **927 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/llms-full.txt

---

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

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

ES module import: `import { CellComments } from '@txtextcontrol/tx-sheet-control';`.

### Constructor

```typescript
new CellComments(sheet: Worksheet, address: string): CellComments
```

| 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/typescript-api/browser/cellcomments/address-property/llms-full.txt) | The address value of CellComments. |
| [sheet](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/sheet-property/llms-full.txt) | The sheet value of CellComments. |
| [thread](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/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/typescript-api/browser/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/typescript-api/browser/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/typescript-api/browser/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/typescript-api/browser/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.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';

function createCellCommentsReport(book: 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

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/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/typescript-api/browser/cellcomments/add-method/llms-full.txt): CellComments.add method in the TX Sheet Control TypeScript API for the browser: Starts a conversation or appends a reply using the current userName.
- [CellComments.address Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/address-property/llms-full.txt): CellComments.address property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [CellComments.edit Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/edit-method/llms-full.txt): CellComments.edit method in the browser TypeScript API: Edits an entry authored by the current user, retaining its original creation time.
- [CellComments.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/remove-method/llms-full.txt): CellComments.remove method in the browser TypeScript 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/typescript-api/browser/cellcomments/resolve-method/llms-full.txt): CellComments.resolve method in the TX Sheet Control TypeScript API for the browser: Resolves or reopens the conversation without altering its entries.
- [CellComments.sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/sheet-property/llms-full.txt): CellComments.sheet property in the TX Sheet Control TypeScript API for the browser, with its type Worksheet and a TypeScript example.
- [CellComments.thread Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/thread-property/llms-full.txt): CellComments.thread property in the TX Sheet Control TypeScript API for the browser: Returns a detached thread, or undefined for a cell without comments.

---

## Nearby

- **Previous:** [CellAddress Type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/celladdress/llms-full.txt)
- **Next:** [CellComments.add Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellcomments/add-method/llms-full.txt)
