java.lang.Object
CollectionBase
com.aspose.cells.CommentCollection
- All Implemented Interfaces:
- java.lang.Iterable
public class CommentCollection
- extends CollectionBase
Encapsulates a collection of Comment objects.
Example:
Workbook workbook = new Workbook();
CommentCollection comments = workbook.getWorksheets().get(0).getComments();
//do your business
Property Getters/Setters Summary |
int | getCount() | → inherited from com.aspose.cells.CollectionBase
|
| |
Comment | get(int) | |
|
Gets the Comment element at the specified index.
|
Comment | get(int, int) | |
|
Gets the Comment element at the specified row index and column index.
|
Comment | get(java.lang.String) | |
|
Gets the Comment element at the specified cell.
|
Method Summary |
int | add(int row, int column) | |
Adds a comment to the collection.
|
int | add(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
int | add(java.lang.String cellName) | |
Adds a comment to the collection.
|
int | addThreadedComment(int row, int column, java.lang.String text, ThreadedCommentAuthor author) | |
Adds a threaded comment.
|
int | addThreadedComment(java.lang.String cellName, java.lang.String text, ThreadedCommentAuthor author) | |
Adds a threaded comment.
|
void | clear() | |
Removes all comments;
|
boolean | contains(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
ThreadedCommentCollection | getThreadedComments(int row, int column) | |
Gets the threaded comments by row and column index.
|
ThreadedCommentCollection | getThreadedComments(java.lang.String cellName) | |
Gets the threaded comments by cell name.
|
int | indexOf(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
java.util.Iterator | iterator() | → inherited from com.aspose.cells.CollectionBase
|
|
void | removeAt(int index) | → inherited from com.aspose.cells.CollectionBase
|
|
void | removeAt(int row, int column) | |
Removes the comment of the specific cell.
|
void | removeAt(java.lang.String cellName) | |
Removes the comment of the specific cell.
|
Property Getters/Setters Detail |
getCount | → inherited from com.aspose.cells.CollectionBase
|
public int getCount()
|
-
-
Gets the Comment element at the specified index.
- Parameters:
index
- The zero based index of the element.
- Returns:
- The element at the specified index.
Example:
Comment comment3 = comments.get(0);
comment3.setNote("Three note.");
get | |
public Comment get(java.lang.String cellName)
|
-
Gets the Comment element at the specified cell.
- Parameters:
cellName
- Cell name.
- Returns:
- The element at the specified cell.
Example:
Comment comment4 = comments.get("B2");
comment4.setNote("Four note.");
get | |
public Comment get(int row, int column)
|
-
Gets the Comment element at the specified row index and column index.
- Parameters:
row
- Row index.column
- Column index.
- Returns:
- The element at the specified cell.
Example:
Comment comment5 = comments.get(1,1);
comment5.setNote("Five note.");
addThreadedComment | |
public int addThreadedComment(int row, int column, java.lang.String text, ThreadedCommentAuthor author) |
-
Adds a threaded comment.
- Parameters:
row
- Cell row index.column
- Cell column index.text
- The text of the commentauthor
- The user of this threaded comment.
- Returns:
- ThreadedComment object index.
addThreadedComment | |
public int addThreadedComment(java.lang.String cellName, java.lang.String text, ThreadedCommentAuthor author) |
-
Adds a threaded comment.
- Parameters:
cellName
- The name of the cell.text
- The text of the commentauthor
- The user of this threaded comment.
- Returns:
- ThreadedComment object index.
-
Gets the threaded comments by row and column index.
- Parameters:
row
- The row index.column
- The column index.
- Returns:
Example:
ThreadedCommentCollection threadedComments1 = comments.getThreadedComments(1, 1);
for (int i = 0; i < threadedComments1.getCount(); ++i)
{
ThreadedComment tc = threadedComments1.get(i);
String note = tc.getNotes();
}
-
Gets the threaded comments by cell name.
- Parameters:
cellName
- The name of the cell.
- Returns:
Example:
ThreadedCommentCollection threadedComments2 = comments.getThreadedComments("B2");
for (int i = 0; i < threadedComments2.getCount(); ++i)
{
ThreadedComment tc = threadedComments2.get(i);
String note = tc.getNotes();
}
add | |
public int add(int row, int column) |
-
Adds a comment to the collection.
- Parameters:
row
- Cell row index.column
- Cell column index.
- Returns:
- Comment object index.
Example:
int commentIndex1 = comments.add(0, 0);
Comment comment1 = comments.get(commentIndex1);
comment1.setNote("First note.");
comment1.getFont().setName("Times New Roman");
add | |
public int add(java.lang.String cellName) |
-
Adds a comment to the collection.
- Parameters:
cellName
- Cell name.
- Returns:
- Comment object index.
Example:
int commentIndex2 = comments.add("B2");
Comment comment2 = comments.get(commentIndex2);
comment2.setNote("Second note.");
comment2.getFont().setName("Times New Roman");
removeAt | |
public void removeAt(java.lang.String cellName) |
-
Removes the comment of the specific cell.
- Parameters:
cellName
- The name of cell which contains a comment.
Example:
comments.removeAt("B2");
removeAt | |
public void removeAt(int row, int column) |
-
Removes the comment of the specific cell.
- Parameters:
row
- The row index.column
- the column index.
Example:
comments.removeAt(1,1);
clear | |
public void clear() |
-
Removes all comments;
Example:
comments.clear();
removeAt | → inherited from com.aspose.cells.CollectionBase
|
public void removeAt(int index) |
-
iterator | → inherited from com.aspose.cells.CollectionBase
|
public java.util.Iterator iterator() |
-
contains | → inherited from com.aspose.cells.CollectionBase
|
public boolean contains(java.lang.Object value) |
- Reserved for internal use.
add | → inherited from com.aspose.cells.CollectionBase
|
public int add(java.lang.Object value) |
- Reserved for internal use.
indexOf | → inherited from com.aspose.cells.CollectionBase
|
public int indexOf(java.lang.Object value) |
- Reserved for internal use.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.