[]
Sheets.Comments.CommentManager
• new CommentManager(sheet)
表示可以管理工作表中所有批注的批注管理器。
| Name | Type | Description |
|---|---|---|
sheet |
Worksheet |
工作表。 |
▸ add(row, col, text): Comment
为指定行列的单元格添加批注。
| Name | Type | Description |
|---|---|---|
row |
number |
单元格的行索引。 |
col |
number |
单元格的列索引。 |
text |
string |
批注的文本。 |
已添加到单元格的批注。
▸ all(): Comment[]
获取工作表中的所有批注。
Comment[]
▸ clear(range): void
清除工作表中指定范围内的所有批注。当未指定范围时,将清除工作表中的所有批注。
| Name | Type | Description |
|---|---|---|
range |
Range |
要清除所有批注的范围。 |
void
▸ get(row, col): Comment
获取指定行列单元格中的批注。
| Name | Type | Description |
|---|---|---|
row |
number |
单元格的行索引。 |
col |
number |
单元格的列索引。 |
指定单元格中的批注。
▸ remove(row, col): void
移除指定行列单元格中的批注。
| Name | Type | Description |
|---|---|---|
row |
number |
单元格的行索引。 |
col |
number |
单元格的列索引。 |
void