SpreadJS Documentation
getComments Method
Gets all the comments on the sheet.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Array
value = instance.getComments();
function getComments() : Array;

Return Value

The GcSpread.Sheets.Comment array of comment instances.
Example
This example uses the getComments method.
var comment = new GcSpread.Sheets.Comment();
comment.text("new comment!");
comment.backColor("yellow");
comment.foreColor("green");
comment.displayMode(GcSpread.Sheets.DisplayMode.AlwaysShown);
activeSheet.setComment(5, 5, comment);

var comment1 = new GcSpread.Sheets.Comment();
comment1.text("Comment1");
comment1.displayMode(GcSpread.Sheets.DisplayMode.AlwaysShown);
activeSheet.setComment(1, 1, comment1);

var gcomments = activeSheet.getComments();
for (var i = 0; i < gcomments.length; i++) {
    alert(gcomments[i].text())
}
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.