Example:
$workbook = new cells\Workbook(); $comments = $workbook->getWorksheets()->get(0)->getComments(); //Add comment to cell A1 $commentIndex = $comments->add(0, 0); $comment = $comments->get($commentIndex); $comment->setNote("First note"); $comment->getFont()->setName("Times New Roman"); //Add comment to cell B2 $comments->add("B2"); $comment = $comments->get("B2"); $comment->setNote("Second note");
Property Getters/Setters Summary | ||
---|---|---|
function | getAuthor() | |
function | setAuthor(value) | |
Gets and sets Name of the original comment author | ||
function | getAutoSize() | |
function | setAutoSize(value) | |
Indicates if size of comment is adjusted automatically according to its content. | ||
function | getColumn() | |
Gets the column index of the comment. | ||
function | getCommentShape() | |
Get a Shape object that represents the shape attached to the specified comment. | ||
function | getFont() | |
Gets the font of comment. | ||
function | getHeight() | |
function | setHeight(value) | |
Represents the Height of the comment, in unit of pixels. | ||
function | getHeightCM() | |
function | setHeightCM(value) | |
Represents the height of the comment, in unit of centimeters. | ||
function | getHeightInch() | |
function | setHeightInch(value) | |
Represents the height of the comment, in unit of inches. | ||
function | getHtmlNote() | |
function | setHtmlNote(value) | |
Gets and sets the html string which contains data and some formats in this comment. | ||
function | isVisible() | |
function | setVisible(value) | |
Represents if the comment is visible or not. | ||
function | getNote() | |
function | setNote(value) | |
Represents the content of comment. | ||
function | getRow() | |
Gets the row index of the comment. | ||
function | getTextHorizontalAlignment() | |
function | setTextHorizontalAlignment(value) | |
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant. | ||
function | getTextOrientationType() | |
function | setTextOrientationType(value) | |
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant. | ||
function | getTextVerticalAlignment() | |
function | setTextVerticalAlignment(value) | |
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant. | ||
function | getThreadedComments() | |
Gets the list of threaded comments; | ||
function | getWidth() | |
function | setWidth(value) | |
Represents the width of the comment, in unit of pixels. | ||
function | getWidthCM() | |
function | setWidthCM(value) | |
Represents the width of the comment, in unit of centimeters. | ||
function | getWidthInch() | |
function | setWidthInch(value) | |
Represents the width of the comment, in unit of inches. |
Method Summary | ||
---|---|---|
function | characters(startIndex, length) | |
Returns a Characters object that represents a range of characters within the comment text. | ||
function | formatCharacters(startIndex, length, font, flag) | |
Format some characters with the font setting. | ||
function | getCharacters() | |
Returns all Characters objects that represents a range of characters within the comment text. |
Property Getters/Setters Detail |
---|
getAuthor/setAuthor : String | |
function getAuthor() / function setAuthor(value) |
getCommentShape : CommentShape | |
function getCommentShape() |
getRow : Number | |
function getRow() |
getColumn : Number | |
function getColumn() |
getThreadedComments : ThreadedCommentCollection | |
function getThreadedComments() |
getNote/setNote : String | |
function getNote() / function setNote(value) |
getHtmlNote/setHtmlNote : String | |
function getHtmlNote() / function setHtmlNote(value) |
getFont : Font | |
function getFont() |
isVisible/setVisible : boolean | |
function isVisible() / function setVisible(value) |
getTextOrientationType/setTextOrientationType : Number | |
function getTextOrientationType() / function setTextOrientationType(value) |
getTextHorizontalAlignment/setTextHorizontalAlignment : Number | |
function getTextHorizontalAlignment() / function setTextHorizontalAlignment(value) |
getTextVerticalAlignment/setTextVerticalAlignment : Number | |
function getTextVerticalAlignment() / function setTextVerticalAlignment(value) |
getAutoSize/setAutoSize : boolean | |
function getAutoSize() / function setAutoSize(value) |
getHeightCM/setHeightCM : Number | |
function getHeightCM() / function setHeightCM(value) |
getWidthCM/setWidthCM : Number | |
function getWidthCM() / function setWidthCM(value) |
getWidth/setWidth : Number | |
function getWidth() / function setWidth(value) |
getHeight/setHeight : Number | |
function getHeight() / function setHeight(value) |
getWidthInch/setWidthInch : Number | |
function getWidthInch() / function setWidthInch(value) |
getHeightInch/setHeightInch : Number | |
function getHeightInch() / function setHeightInch(value) |
Method Detail |
---|
formatCharacters | |
function formatCharacters(startIndex, length, font, flag) |
startIndex: Number
- The start index.length: Number
- The length.font: Font
- The font setting.flag: StyleFlag
- The flag of the font setting.characters | |
function characters(startIndex, length) |
startIndex: Number
- The index of the start of the character.length: Number
- The number of characters.getCharacters | |
function getCharacters() |