> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Comments and notes

## `ExcelCommentCollection`

`Excel.CommentCollection` of a sheet or of the workbook.

Import from `@reductoai/xlsx/officejs`.

### ExcelCommentCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `ExcelComment[]` | read-only |

### `ExcelCommentCollection.add()`

```ts theme={null}
add(
  cellAddress: string | ExcelRange,
  content: string | CommentRichContent,
  contentType?: ContentType,
): ExcelComment
```

The author is `userName` and `userEmail` (extensions; Office.js uses the signed-in user).

### `ExcelCommentCollection.getCount()`

```ts theme={null}
getCount(): { value: number }
```

### `ExcelCommentCollection.getItem()`

```ts theme={null}
getItem(commentId: string): ExcelComment
```

### `ExcelCommentCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): ExcelComment
```

### `ExcelCommentCollection.getItemByCell()`

```ts theme={null}
getItemByCell(cellAddress: string | ExcelRange): ExcelComment
```

### `ExcelCommentCollection.getItemByReplyId()`

```ts theme={null}
getItemByReplyId(replyId: string): ExcelComment
```

### `ExcelCommentCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(commentId: string): ExcelComment & { isNullObject: boolean }
```

## `ExcelComment`

`Excel.Comment`: a threaded comment and its replies.

Import from `@reductoai/xlsx/officejs`.

### ExcelComment properties

| Name | Type | Description |
| - | - | - |
| `authorEmail` | `string` | read-only |
| `authorName` | `string` | read-only |
| `content` | `string` | |
| `contentType` | `ContentType` | read-only |
| `creationDate` | `Date` | read-only |
| `id` | `string` | read-only |
| `mentions` | `CommentMention[]` | read-only |
| `replies` | `ExcelCommentReplyCollection` | read-only |
| `resolved` | `boolean` | |
| `richContent` | `string` | read-only |

### `ExcelComment.delete()`

```ts theme={null}
delete(): void
```

Deletes the comment with its replies.

### `ExcelComment.getLocation()`

```ts theme={null}
getLocation(): ExcelRange
```

### `ExcelComment.set()`

```ts theme={null}
set(properties: ExcelComment | UpdateData<ExcelComment>, options?: UpdateOptions): void
```

### `ExcelComment.updateMentions()`

```ts theme={null}
updateMentions(contentWithMentions: CommentRichContent): void
```

## `ExcelCommentReply`

`Excel.CommentReply`.

Import from `@reductoai/xlsx/officejs`.

### ExcelCommentReply properties

| Name | Type | Description |
| - | - | - |
| `authorEmail` | `string` | read-only |
| `authorName` | `string` | read-only |
| `content` | `string` | |
| `contentType` | `ContentType` | read-only |
| `creationDate` | `Date` | read-only |
| `id` | `string` | read-only |
| `mentions` | `CommentMention[]` | read-only |
| `resolved` | `boolean` | read-only The thread's state; a reply cannot be resolved by itself. |
| `richContent` | `string` | read-only |

### `ExcelCommentReply.delete()`

```ts theme={null}
delete(): void
```

### `ExcelCommentReply.getLocation()`

```ts theme={null}
getLocation(): ExcelRange
```

### `ExcelCommentReply.getParentComment()`

```ts theme={null}
getParentComment(): ExcelComment
```

### `ExcelCommentReply.set()`

```ts theme={null}
set(
  properties: ExcelCommentReply | UpdateData<ExcelCommentReply>,
  options?: UpdateOptions,
): void
```

### `ExcelCommentReply.updateMentions()`

```ts theme={null}
updateMentions(contentWithMentions: CommentRichContent): void
```

## `ExcelNoteCollection`

`Excel.NoteCollection` of a sheet or of the workbook.

Import from `@reductoai/xlsx/officejs`.

### ExcelNoteCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `ExcelNote[]` | read-only |

### `ExcelNoteCollection.add()`

```ts theme={null}
add(cellAddress: string | ExcelRange, content: string): ExcelNote
```

A note by its own author, `userName` (an extension; Office.js uses the signed-in user).

### `ExcelNoteCollection.getCount()`

```ts theme={null}
getCount(): { value: number }
```

### `ExcelNoteCollection.getItem()`

```ts theme={null}
getItem(key: string): ExcelNote
```

### `ExcelNoteCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): ExcelNote
```

### `ExcelNoteCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): ExcelNote & { isNullObject: boolean }
```

## `ExcelNote`

`Excel.Note`: a classic cell note.

Import from `@reductoai/xlsx/officejs`.

### ExcelNote properties

| Name | Type | Description |
| - | - | - |
| `authorName` | `string` | read-only |
| `content` | `string` | |
| `height` | `number` | |
| `visible` | `boolean` | |
| `width` | `number` | In points. |

### `ExcelNote.delete()`

```ts theme={null}
delete(): void
```

### `ExcelNote.getLocation()`

```ts theme={null}
getLocation(): ExcelRange
```

### `ExcelNote.set()`

```ts theme={null}
set(properties: ExcelNote | UpdateData<ExcelNote>, options?: UpdateOptions): void
```
