You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Javascript-ES6/comment.md
+71-67Lines changed: 71 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,16 @@ documentation: ug
8
8
---
9
9
10
10
# Comment in EJ2 TypeScript Spreadsheet control
11
+
The **Comment** feature allows you to add feedback to cells without changing their values, enabling contextual discussions through threaded **replies**. Unlike [Notes](./notes), Comment include advanced review tools such as **resolve** and **reopen** to track status, plus an optional **Comments Review Pane** for browsing and managing threads.
11
12
12
-
The **Comment** feature allows you to add remarks and **replies**to cells, making it easier to provide feedback or enabling contextual discussions without altering cell values. Comment are distinct from **Notes** and includes advanced capabilities such as replies, resolve/reopen, and an optional **Comments Review Pane** to maintain clear communication and streamline review workflows. When a cell contains a comment, a small comment indicator appears in its corner. Hover over the indicator to preview the comment.
13
+
Cells with comment display a small comment indicator; hover to preview the comment editor. This provides a clear, collaborative workflow while keeping data intact.
13
14
14
15

15
16
16
17
## Author identity
17
-
18
18
The Syncfusion Spreadsheet does not automatically track user identity. To tag new comments and replies with an author name, set the `author` property when initializing the Spreadsheet.
@@ -27,139 +26,147 @@ The Syncfusion Spreadsheet does not automatically track user identity. To tag ne
27
26
);
28
27
// Render initialized Spreadsheet
29
28
spreadsheet.appendTo('#element');
30
-
31
29
```
32
-
If the author property is not set, Guest User will be displayed as the author for comment and replies by default.
30
+
>If the author property is not set, "Guest User" will be displayed as the author for comment and replies by default.
33
31
34
32
## Adding a comment
35
-
36
-
You can add a **comment** to a cell in the following ways:
37
-
***Context menu**: Right-click the target cell and click **"New Comment"**.
38
-
***Ribbon**: Use **Review > Comment > New Comment**.
39
-
***Keyboard shortcut**: Press **Ctrl + Shift + F2** to open the comment container.
33
+
You can add a **comment** to a cell in several ways:
34
+
***Context menu**: Right-click the target cell and select **"New Comment"**.
35
+
***Ribbon**: Go to **Review > Comment > New Comment**.
36
+
***Keyboard shortcut**: Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F2</kbd> to open the comment editor for the active cell.
40
37
***Programmatically**:
41
38
* Use the `updateCell` method with the comment model to add a comment to a specific cell.
42
-
*Integrate comments during initial loading by binding the comment model to the cell model when initializing the spreadsheet.
39
+
*Bind comments via code-behind during initial load by associating the comment model with the cell model.
43
40
44
-

41
+
The image below shows that once a comment is posted, the cell displays an indicator, and the comment can be previewed on hover.
45
42
46
-
After posting, the comment becomes visible with the comment indicator in the cell and can be previewed on hover.
43
+

47
44
48
45
## Adding a reply
49
-
50
46
You can add one or more replies to an existing comment to provide additional details or answers:
51
-
52
47
***Context menu**: Right-click the cell that already has a comment, select **Comment > New Reply**, enter your reply, and click **Post**.
53
-
***Ribbon**: Use **Review > Comment > New Comment** on a cell that contains a comment. This triggers**reply mode**.
54
-
***Comment container**: Open the comment container by hovering over the comment indicator, type your reply in the input box, and click **Post**.
55
-
***Keyboard shortcut**: Press **Ctrl + Shift + F2** on a cell that contains a comment to open the comment container in reply mode.
48
+
***Ribbon**: Go to **Review > Comment > New Comment** on a cell that contains a comment. This opens the comment editor in**reply mode**.
49
+
***Comment editor**: Open the comment editor by hovering over the comment indicator, type your reply, and click **Post**.
50
+
***Keyboard shortcut**: Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F2</kbd> on a cell that contains a comment to open the comment editor in reply mode.
56
51
57
-
After posting, the replies appear under the initial comment in the container.
52
+
After posting, the replies appear under the first comment in the comment editor.
58
53
59
-
## Editing a comment or reply
54
+

60
55
61
-
You can edit the content of a comment or its replies directly within the comment container
56
+
## Editing a comment
57
+
You can edit the content of a comment or its replies directly within the comment editor.
62
58
63
-
***Edit initial comment**: In the comment container. Click the **⋯ (More thread actions)** menu in the header, select **Edit Comment**, modify the text and click **Post**.
64
-
***Edit a reply comment**: In the comment container, hover over the specific reply, click the **⋯ (More actions)**, select **Edit Comment**, update the text and click **Post**.
59
+
***Edit first comment**: In the comment editor. Click the **"⋯" (More thread actions)** menu in the header, select the**Edit Comment**, modify the text and click **Post**.
60
+
***Edit a reply comment**: In the comment editor, hover over the specific reply, click the **"⋯" (More actions)**, select the **Edit Comment**, modify the text and click **Post**.
65
61
66
62

67
63
68
64
## Resolve and Reopen
69
-
70
65
The **Resolve thread** option marks a comment thread as completed when the discussion or issue is addressed. When a thread is resolved, its background color changes to indicate the resolved state, and the reply input box and reply menu actions are hidden. Use **Reopen** to restore the comment if further discussion is needed.
71
66
72
67
### Resolve a comment
73
-
* In the comment container, click the **⋯ (More thread actions)** menu in the container header and select **Resolve Thread**.
68
+
* In the comment editor, click the **"⋯" (More thread actions)** menu in the header and select **Resolve Thread**.
74
69
75
70
### Reopen a comment
76
-
* In the comment container, click the **Reopen** button in the container header to make the thread active again.
71
+
* In the comment editor, click the **Reopen** button in the header to make the thread active again.
77
72
78
73

79
74
80
75
You can also use the `isResolved` property in the comment model when initializing or updating comments programmatically.
81
76
77
+
**Example: Using `isResolved` property in the comment model with the `updateCell` method**
78
+
79
+
```ts
80
+
// Update a cell with a comment using the updateCell method
81
+
spreadsheet.updateCell({
82
+
comment: {
83
+
author: 'Chistoper', text: 'Are you completed the report',
84
+
createdTime: 'January 03, 2026 at 5:00 PM',
85
+
// Set to true to mark the thread as resolved; false keeps it active
You can delete either a specific reply or an entire comment thread (including all replies) using the following options:
84
96
85
97
### Deleting a comment thread
86
98
***Context menu**: Right-click the cell that contains the comment and select **Comment > Delete Comment**.
87
-
***Ribbon**: Use **Review > Comment > Delete Comment** on a cell that contains the comment.
88
-
***Comment container**: In the comment container, click the **⋯ (More thread actions)** menu in the header and select **Delete Thread** for an active comment or use the **Delete Thread** button in container header for a resolved comment.
89
-
90
-

99
+
***Ribbon**: Go to **Review > Comment > Delete Comment** on a cell that contains the comment.
100
+
***Comment editor**: In the comment editor, click the **"⋯" (More thread actions)** menu in the header and select **Delete Thread** for an active comment or use the **Delete Thread** button in header for a resolved comment.
91
101
92
102
Deleting a thread removes the comment and all its replies from the cell.
93
103
104
+

105
+
94
106
### Delete a reply
95
-
In the comment container, hover over the reply and click the **⋯ (More actions)** menu then select **Delete Comment**.
107
+
In the comment editor, hover over the reply and click the **"⋯" (More actions)** menu then select **Delete Comment**.
96
108
97
109

98
110
99
111
## Next and Previous Comment
100
-
101
-
The **Review > Comment > Next Comment and Previous Comment** options in the ribbon allows you to quickly navigate between cells that contain comments:
112
+
The **Review > Comment > Next Comment and Previous Comment** options in the ribbon allow you to quickly navigate between cells that contain comments:
102
113
103
114
***Next Comment**: Moves to the next cell with a comment.
104
115
***Previous Comment**: Moves to the previous cell with a comment.
105
116
106
117
Navigation starts within the active sheet. When all comments in the active sheet have been visited (end or start reached), the navigation automatically continues to the next or previous sheet that contains comments. This ensures you can review all comments across the workbook without manually switching sheets.
107
118
108
-
## Show Comments and Comments Review Pane
119
+

109
120
110
-
The **Comments Review Pane** provides a centralized view of all comments in the active sheet and offers filtering, inline actions, and navigation. This pane helps you to manage comments efficiently without switching between individual cells.
121
+
## Comments review pane
122
+
The **"Comments" review pane** provides a centralized view of all comments in the active sheet, making it easier to manage discussions without switching between individual cells. It offers filtering, inline actions, and navigation, ensuring an efficient review workflow across the workbook.
111
123
112
-
You can show or hide the Comments Review Pane using:
124
+
You can show or hide the "Comments" review pane using:
113
125
114
-
***Ribbon**: Use**Review > Comment > Show Comments**.
115
-
***Property**: Set the `showCommentsPane` property when initializing the Spreadsheet. The default value for the `showCommentsPane`property is `false`.
126
+
***Ribbon**: Go to**Review > Comment > Show Comments**.
127
+
***Property**: Set the `showCommentsPane` property to true when initializing the Spreadsheet. By default, this property is **false**.
116
128
117
129

118
130
119
-
### Features of the Comments Review Pane
131
+
### Features of the comments review pane
132
+
The "Comments" review pane is rendered within the spreadsheet interface to provide a dedicated space for managing comments efficiently. It acts as a centralized hub where you can view all comment threads, perform actions, and keep discussions organized without navigating cell by cell.
120
133
121
-
The Comments Review Pane allows you to:
134
+
The "Comments" review pane allows you to:
122
135
123
-
***Add new comment** using the **New** button.
124
-
***Filter comments** by **All**, **Active**, or **Resolved** to focus on specific comments.
125
-
***Navigate between comments** and synchronize selection with the corresponding cells.
136
+
* Add new comment using the **New** button.
137
+
* Filter comments by **All**, **Active**, or **Resolved** to view specific comment threads.
138
+
* Navigate between comments and synchronize selection with the corresponding cells.
126
139
* Perform actions such as:
127
-
***Reply** – Add replies directly from the pane.
140
+
***Reply** – Add replies directly from the review pane.
128
141
***Edit** – Modify the text of a comment or reply.
129
142
***Delete** – Remove a reply or an entire thread.
130
143
***Resolve/Reopen** – Change the status of a comment.
131
144
132
-
When the Review Pane is open, all actions performed in the comments review pane or in the cell’s comment container are synchronized:
145
+
When the review pane is open, all actions performed in the review pane or in the cell’s comment editor are synchronized:
133
146
134
-
* Selecting a comment in the Comments Review Pane highlights the corresponding cell in the sheet.
135
-
* Selecting a cell with a comment focuses the respective comment thread in the Comments Review Pane.
136
-
* Actions such as **Reply**, **Edit**, **Delete**, and **Resolve/Reopen** update both the pane comment thread and the cell comment container instantly, ensuring consistency across the UI.
147
+
* Selecting a comment in the review pane highlights the corresponding cell in the sheet.
148
+
* Selecting a cell with a comment focuses the respective comment thread in the review pane.
149
+
* Actions such as **Reply**, **Edit**, **Delete**, and **Resolve/Reopen** update both the pane and the cell comment editor instantly, ensuring consistency across the UI.
150
+
* The review pane dynamically updates when comments are added, deleted, or resolved, so you always see the latest state without refreshing.
137
151
138
152
## Saving a Workbook with Comments
139
-
140
153
You can save spreadsheet data along with **comments** using **File > Save As > Microsoft Excel(.xlsx)**.
141
154
-**MS Excel (.xlsx)** - Preserves all **threaded comments** (modern comments).
142
155
143
156
> Comments are **not included** when exporting to **.xls**, **.csv**, and **.pdf**.
144
157
145
-
### Why Comments Are Not Saved in `.xls`
158
+
### Why comments are not saved in `.xls`
146
159
The **.xls** format is based on the older Excel binary structure (BIFF8), which does not support modern features like **threaded comments**.
147
160
Threaded comments introduced in newer Excel versions require the **Open XML** structure used by `.xlsx`.
148
161
149
162
> To retain threaded comments, always save the workbook in **.xlsx** format.
150
163
151
-
## Integrating comments during initial loading using cell data binding
152
-
164
+
## Bind Comments via code-behind
153
165
You can bind **comment thread** to cells at initial load by providing a `comment` object in the cell model. Each cell supports **per comment thread**, which can include:
-**Replies**: A collection of replies. Each reply is an object containing its `author`, `text`, and `createdTime` (no nested replies-of-replies).
156
168
157
-
When the workbook renders, cells that include a `comment`:
158
-
- Show the **comment indicator** in the cell corner.
159
-
- Open the **comment container** on hover.
160
-
- Appear in the **Comments Review Pane** if it is shown.
161
-
162
-
In the below sample, comments are added to a specific cell using cell data binding. The review pane is shown initially by enabling the `showCommentsPane` property, and comments are added using `updateCell` method in the `created` event.
169
+
In the below sample, comments are added to a specific cell using cell data binding. The "Comments" review pane is shown initially by enabling the `showCommentsPane` property, and comments are added using `updateCell` method in the `created` event.
163
170
164
171
{% tabs %}
165
172
{% highlight ts tabtitle="index.ts" %}
@@ -172,20 +179,17 @@ In the below sample, comments are added to a specific cell using cell data bindi
***One thread per cell**: Attach a single `comment` object per cell. New remarks should be added as replies inside the existing thread.
178
-
***Comments and Notes cannot coexist**: When a cell contains comment, notes cannot be added. Similarly, if a cell already has a notes, comment cannot be added.
179
-
***New comment**: When the Comments Review Pane is enabled, adding a new comment renders the drafted comment container directly in the Comments Review Pane.
180
-
***Comments in Print**: Comments are not included in print output.
181
184
***Author Identity**: The author name for each comment and reply is static once set. When exporting, the author information is preserved for all comments, even if multiple authors exist in the workbook.
185
+
***New comment**: When the "Comments" review pane is enabled, adding a new comment renders the drafted comment editor directly in the "Comments" review pane.
182
186
183
187
## Limitations
184
-
185
-
***Un-posted comment is not stored**: If you type in the comment container and close it without clicking **Post**, the entered text is not saved and does not retain in the input box when you reopen the container. Only posted content is persisted in the comment model.
188
+
***Un-posted comments are not stored**: If you type in the comment editor and close it without clicking **Post**, the entered text is not saved and will not appear when you reopen the editor. Only posted content is persisted in the comment model.
189
+
***Comments and Notes cannot coexist**: When a cell contains comment, notes cannot be added. Similarly, if a cell already has a notes, comment cannot be added.
190
+
***Comments in Print**: Comments are not included in print output.
186
191
***Non-collaborative**: Real-time multi-user synchronization is not supported. However, when exporting and re-importing the workbook, the author information for each comment and reply is preserved.
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Javascript-ES6/keyboard-shortcuts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ The keyboard shortcuts supported in the spreadsheet are,
107
107
| Shift + Enter | Complete the cell editing and select the cell above in the same column. |
108
108
| Tab | Complete the cell editing and select the next cell in the same row. |
109
109
| Shift + Tab | Complete the cell editing and select the previous cell in the same row. |
110
-
| Ctrl + Shift + F2 |Open the threaded comment container for the desired cells. Upon pressing the `Esc` key, the comment container in focus will close. |
110
+
| Ctrl + Shift + F2 |Opens the comment editor for the active cell. Upon pressing the `Esc` key, the comment editor in focus will close. |
111
111
| Shift + F2 | Open the dialog box to add or edit notes for the desired cells. Meanwhile, upon pressing the `Esc` key, the dialog box for notes, when in focus, will save and close. |
112
112
| Alt | Focus on the active ribbon tab. |
113
113
| Left | Move the focus to the previous items in the ribbon content. |
0 commit comments