aspose.cells
Class CommentCollection

Encapsulates a collection of Comment objects.

Example:

$workbook = new cells\Workbook();
$comments = $workbook->getWorksheets()->get(0)->getComments();

Property Getters/Setters Summary
functiongetCount()
          
functionget(index)
           Gets the Comment element at the specified index.
functionget(row, column)
           Gets the Comment element at the specified row index and column index.
functionget(cellName)
           Gets the Comment element at the specified cell.
 
Method Summary
functionadd(row, column)
           Adds a comment to the collection.
functionadd(value)→ inherited from CollectionBase
          Reserved for internal use.
functionadd(cellName)
           Adds a comment to the collection.
functionaddThreadedComment(row, column, text, author)
           Adds a threaded comment.
functionaddThreadedComment(cellName, text, author)
           Adds a threaded comment.
functionclear()
           Removes all comments;
functioncontains(value)→ inherited from CollectionBase
          Reserved for internal use.
functionget(index)→ inherited from CollectionBase
          Reserved for internal use.
functiongetThreadedComments(row, column)
           Gets the threaded comments by row and column index.
functiongetThreadedComments(cellName)
           Gets the threaded comments by cell name.
functionindexOf(value)→ inherited from CollectionBase
          Reserved for internal use.
functioniterator()→ inherited from CollectionBase
          
functionremoveAt(index)→ inherited from CollectionBase
          
functionremoveAt(row, column)
           Removes the comment of the specific cell.
functionremoveAt(cellName)
           Removes the comment of the specific cell.
 

Property Getters/Setters Detail

getCount : Number 

function getCount()

get : Comment 

function get(index)
Gets the Comment element at the specified index.
Parameters:
index - The zero based index of the element.
Returns:
The element at the specified index.

get : Comment 

function get(cellName)
Gets the Comment element at the specified cell.
Parameters:
cellName - Cell name.
Returns:
The element at the specified cell.

get : Comment 

function get(row, 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.

Method Detail

addThreadedComment

function addThreadedComment(row, column, text, author)
Adds a threaded comment.
Parameters:
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

function addThreadedComment(cellName, text, author)
Adds a threaded comment.
Parameters:
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

function getThreadedComments(row, column)
Gets the threaded comments by row and column index.
Parameters:
row: Number - The row index.
column: Number - The column index.
Returns:

getThreadedComments

function getThreadedComments(cellName)
Gets the threaded comments by cell name.
Parameters:
cellName: String - The name of the cell.
Returns:

add

function add(row, column)
Adds a comment to the collection.
Parameters:
row: Number - Cell row index.
column: Number - Cell column index.
Returns:
Comment object index.

add

function add(cellName)
Adds a comment to the collection.
Parameters:
cellName: String - Cell name.
Returns:
Comment object index.

removeAt

function removeAt(cellName)
Removes the comment of the specific cell.
Parameters:
cellName: String - The name of cell which contains a comment.

removeAt

function removeAt(row, column)
Removes the comment of the specific cell.
Parameters:
row: Number - The row index.
column: Number - the column index.

clear

function clear()
Removes all comments;

removeAt

function removeAt(index)

iterator

function iterator()

get

function get(index)
Reserved for internal use.

contains

function contains(value)
Reserved for internal use.

add

function add(value)
Reserved for internal use.

indexOf

function indexOf(value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.