CommentCollection
CommentCollection class
Encapsulates a collection of Comment objects.
class CommentCollection;
Example
const { Workbook } = require("aspose.cells.node");
var workbook = new Workbook();
var comments = workbook.getWorksheets().get(0).getComments();
Methods
Method | Description |
---|---|
get(number) | Gets the Comment element at the specified index. |
get(string) | Gets the Comment element at the specified cell. |
get(number, number) | Gets the Comment element at the specified row index and column index. |
addThreadedComment(number, number, string, ThreadedCommentAuthor) | Adds a threaded comment. |
addThreadedComment(string, string, ThreadedCommentAuthor) | Adds a threaded comment. |
getThreadedComments(number, number) | Gets the threaded comments by row and column index. |
getThreadedComments(string) | Gets the threaded comments by cell name. |
add(number, number) | Adds a comment to the collection. |
add(string) | Adds a comment to the collection. |
removeAt(string) | Removes the comment of the specific cell. |
removeAt(number, number) | Removes the comment of the specific cell. |
clear() | Removes all comments; |
getCount() | Gets the number of elements contained in. |
isNull() | Checks whether the implementation object is null. |
get(number)
Gets the Comment element at the specified index.
get(index: number) : Comment;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | The zero based index of the element. |
Returns
The element at the specified index.
get(string)
Gets the Comment element at the specified cell.
get(cellName: string) : Comment;
Parameters:
Parameter | Type | Description |
---|---|---|
cellName | string | Cell name. |
Returns
The element at the specified cell.
get(number, number)
Gets the Comment element at the specified row index and column index.
get(row: number, column: number) : Comment;
Parameters:
Parameter | Type | Description |
---|---|---|
row | number | Row index. |
column | number | Column index. |
Returns
The element at the specified cell.
addThreadedComment(number, number, string, ThreadedCommentAuthor)
Adds a threaded comment.
addThreadedComment(row: number, column: number, text: string, author: ThreadedCommentAuthor) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
row | number | Cell row index. |
column | number | Cell column index. |
text | string | The text of the comment |
author | ThreadedCommentAuthor | The user of this threaded comment. |
Returns
ThreadedComment object index.
addThreadedComment(string, string, ThreadedCommentAuthor)
Adds a threaded comment.
addThreadedComment(cellName: string, text: string, author: ThreadedCommentAuthor) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
cellName | string | The name of the cell. |
text | string | The text of the comment |
author | ThreadedCommentAuthor | The user of this threaded comment. |
Returns
ThreadedComment object index.
getThreadedComments(number, number)
Gets the threaded comments by row and column index.
getThreadedComments(row: number, column: number) : ThreadedCommentCollection;
Parameters:
Parameter | Type | Description |
---|---|---|
row | number | The row index. |
column | number | The column index. |
Returns
getThreadedComments(string)
Gets the threaded comments by cell name.
getThreadedComments(cellName: string) : ThreadedCommentCollection;
Parameters:
Parameter | Type | Description |
---|---|---|
cellName | string | The name of the cell. |
Returns
add(number, number)
Adds a comment to the collection.
add(row: number, column: number) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
row | number | Cell row index. |
column | number | Cell column index. |
Returns
Comment object index.
add(string)
Adds a comment to the collection.
add(cellName: string) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
cellName | string | Cell name. |
Returns
Comment object index.
removeAt(string)
Removes the comment of the specific cell.
removeAt(cellName: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
cellName | string | The name of cell which contains a comment. |
removeAt(number, number)
Removes the comment of the specific cell.
removeAt(row: number, column: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
row | number | The row index. |
column | number | the column index. |
clear()
Removes all comments;
clear() : void;
getCount()
Gets the number of elements contained in.
getCount() : number;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;