# CellComments.edit Method

> CellComments.edit method in the TX Sheet Control TypeScript API for Node.js: Edits an entry authored by the current user, retaining its original creation time.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > CellComments > CellComments.edit Method
- **476 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/edit-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/edit-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/edit-method/llms-full.txt

---

Edits an entry authored by the current user, retaining its original creation time.

Owner: [CellComments](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```typescript
edit(id: string, text: string): void
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `id` | `string` | No | Stable identity in the owning document/collection. |
| `text` | `string` | No | Value matching text's declared type and the owning object's validation rules. |

### Return Value

`void`.

### Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

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

function updateInvoiceComment(control: ServerSheetControl) {
    const book = control.workbook;
    const comments = book.sheets.at(0).cell('B10').comments;
    const id = comments.add('Please review this total.');
    comments.edit(id, 'Total reviewed and approved.');
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [CellComments Class](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/llms-full.txt)
- [Comments, Notes and Hyperlinks](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/comments/llms-full.txt)

---

## Nearby

- **Previous:** [CellComments.address Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/address-property/llms-full.txt)
- **Next:** [CellComments.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellcomments/remove-method/llms-full.txt)
