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 | isThreadedComment() | |
Indicates whether this comment is a threaded 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.
|
||
function | getRichFormattings() | |
Returns all Characters objects
that represents a range of characters within the comment text.
|
function getAuthor() / function setAuthor(value)
function getCommentShape()
function getRow()
function getColumn()
function isThreadedComment()
function getThreadedComments()
function getNote() / function setNote(value)
function getHtmlNote() / function setHtmlNote(value)
function getFont()
function isVisible() / function setVisible(value)
function getTextOrientationType() / function setTextOrientationType(value)
function getTextHorizontalAlignment() / function setTextHorizontalAlignment(value)
function getTextVerticalAlignment() / function setTextVerticalAlignment(value)
function getAutoSize() / function setAutoSize(value)
function getHeightCM() / function setHeightCM(value)
function getWidthCM() / function setWidthCM(value)
function getWidth() / function setWidth(value)
function getHeight() / function setHeight(value)
function getWidthInch() / function setWidthInch(value)
function getHeightInch() / function setHeightInch(value)
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.function characters(startIndex, length)
startIndex: Number
- The index of the start of the character.length: Number
- The number of characters.function getCharacters()
function getRichFormattings()