com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaginatedSaveOptions
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SheetSet
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

com.aspose.cells
Class Comment

java.lang.Object
    extended by com.aspose.cells.Comment

public class Comment 
extends java.lang.Object

Encapsulates the object that represents a cell comment.

Example:

Workbook workbook = new Workbook();
CommentCollection comments = workbook.getWorksheets().get(0).getComments();

//Add comment to cell A1
int commentIndex1 = comments.add(0, 0);
Comment comment1 = comments.get(commentIndex1);
comment1.setNote("First note.");
comment1.getFont().setName("Times New Roman");

//Add comment to cell B2
comments.add("B2");
Comment comment2 = comments.get("B2");
comment2.setNote("Second note.");

//do your business

//Save the excel file.
workbook.save("exmaple.xlsx");


Property Getters/Setters Summary
java.lang.StringgetAuthor()
voidsetAuthor(java.lang.String)
           Gets and sets Name of the original comment author
booleangetAutoSize()
voidsetAutoSize(boolean)
           Indicates if size of comment is adjusted automatically according to its content.
intgetColumn()
           Gets the column index of the comment.
CommentShapegetCommentShape()
           Get a Shape object that represents the shape attached to the specified comment.
FontgetFont()
           Gets the font of comment.
intgetHeight()
voidsetHeight(int)
           Represents the Height of the comment, in unit of pixels.
doublegetHeightCM()
voidsetHeightCM(double)
           Represents the height of the comment, in unit of centimeters.
doublegetHeightInch()
voidsetHeightInch(double)
           Represents the height of the comment, in unit of inches.
java.lang.StringgetHtmlNote()
voidsetHtmlNote(java.lang.String)
           Gets and sets the html string which contains data and some formats in this comment.
booleanisThreadedComment()
           Indicates whether this comment is a threaded comment.
booleanisVisible()
voidsetVisible(boolean)
           Represents if the comment is visible or not.
java.lang.StringgetNote()
voidsetNote(java.lang.String)
           Represents the content of comment.
intgetRow()
           Gets the row index of the comment.
intgetTextHorizontalAlignment()
voidsetTextHorizontalAlignment(int)
           Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.
intgetTextOrientationType()
voidsetTextOrientationType(int)
           Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.
intgetTextVerticalAlignment()
voidsetTextVerticalAlignment(int)
           Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.
ThreadedCommentCollectiongetThreadedComments()
           Gets the list of threaded comments;
intgetWidth()
voidsetWidth(int)
           Represents the width of the comment, in unit of pixels.
doublegetWidthCM()
voidsetWidthCM(double)
           Represents the width of the comment, in unit of centimeters.
doublegetWidthInch()
voidsetWidthInch(double)
           Represents the width of the comment, in unit of inches.
 
Method Summary
FontSettingcharacters(int startIndex, int length)
           Returns a Characters object that represents a range of characters within the comment text.
voidformatCharacters(int startIndex, int length, Font font, StyleFlag flag)
           Format some characters with the font setting.
java.util.ArrayListgetCharacters()
           Returns all Characters objects that represents a range of characters within the comment text.
 

Property Getters/Setters Detail

getAuthor/setAuthor

public java.lang.String getAuthor() / public void setAuthor(java.lang.String value)
Gets and sets Name of the original comment author

Example:

comment1.setAuthor("Carl.Yang");

getCommentShape

public CommentShape getCommentShape()
Get a Shape object that represents the shape attached to the specified comment.

Example:

CommentShape shape = comment1.getCommentShape();
int w = shape.getWidth();
int h = shape.getHeight();

getRow

public int getRow()
Gets the row index of the comment.

Example:

int row = comment1.getRow();

getColumn

public int getColumn()
Gets the column index of the comment.

Example:

int column = comment1.getColumn();

isThreadedComment

public boolean isThreadedComment()
Indicates whether this comment is a threaded comment.

Example:

if(comment1.isThreadedComment())
{
    //This comment is a threaded comment.
}

getThreadedComments

public ThreadedCommentCollection getThreadedComments()
Gets the list of threaded comments;

Example:

ThreadedCommentCollection threadedComments = comment1.getThreadedComments();
for (int i = 0; i < threadedComments.getCount(); ++i)
{
    ThreadedComment tc = threadedComments.get(i);
    String note = tc.getNotes();
}

getNote/setNote

public java.lang.String getNote() / public void setNote(java.lang.String value)
Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment.

Example:

comment1.setNote("First note.");

getHtmlNote/setHtmlNote

public java.lang.String getHtmlNote() / public void setHtmlNote(java.lang.String value)
Gets and sets the html string which contains data and some formats in this comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment.

Example:

comment1.setHtmlNote("<Font Style='FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #0000ff;TEXT-ALIGN: left;'>This is a <b>test</b>.</Font>");

getFont

public Font getFont()
Gets the font of comment.

Example:

Font font = comment1.getFont();
font.setSize(12);

isVisible/setVisible

public boolean isVisible() / public void setVisible(boolean value)
Represents if the comment is visible or not.

Example:

if(comment1.isVisible())
{
    //The comment is visible
}

getTextOrientationType/setTextOrientationType

public int getTextOrientationType() / public void setTextOrientationType(int value)
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.

Example:

if(comment1.getTextOrientationType() == TextOrientationType.NO_ROTATION)
{
    comment1.setTextOrientationType(TextOrientationType.TOP_TO_BOTTOM);
}

getTextHorizontalAlignment/setTextHorizontalAlignment

public int getTextHorizontalAlignment() / public void setTextHorizontalAlignment(int value)
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.

Example:

if (comment1.getTextHorizontalAlignment() ==  TextAlignmentType.FILL)
{
    comment1.setTextHorizontalAlignment(TextAlignmentType.CENTER);
}

getTextVerticalAlignment/setTextVerticalAlignment

public int getTextVerticalAlignment() / public void setTextVerticalAlignment(int value)
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.

Example:

if (comment1.getTextVerticalAlignment() ==  TextAlignmentType.FILL)
{
    comment1.setTextVerticalAlignment(TextAlignmentType.CENTER);
}

getAutoSize/setAutoSize

public boolean getAutoSize() / public void setAutoSize(boolean value)
Indicates if size of comment is adjusted automatically according to its content.

Example:

if(!comment1.getAutoSize())
{
    //The size of the comment varies with the content
    comment1.setAutoSize(true);
}

getHeightCM/setHeightCM

public double getHeightCM() / public void setHeightCM(double value)
Represents the height of the comment, in unit of centimeters.

Example:

comment1.setHeightCM(1.0);

getWidthCM/setWidthCM

public double getWidthCM() / public void setWidthCM(double value)
Represents the width of the comment, in unit of centimeters.

Example:

comment1.setWidthCM(1.0);

getWidth/setWidth

public int getWidth() / public void setWidth(int value)
Represents the width of the comment, in unit of pixels.

Example:

comment1.setWidth(10);

getHeight/setHeight

public int getHeight() / public void setHeight(int value)
Represents the Height of the comment, in unit of pixels.

Example:

comment1.setHeight(10);

getWidthInch/setWidthInch

public double getWidthInch() / public void setWidthInch(double value)
Represents the width of the comment, in unit of inches.

Example:

comment1.setWidthInch(1.0);

getHeightInch/setHeightInch

public double getHeightInch() / public void setHeightInch(double value)
Represents the height of the comment, in unit of inches.

Example:

comment1.setHeightInch(1.0);

Method Detail

formatCharacters

public void formatCharacters(int startIndex, int length, Font font, StyleFlag flag)
                     throws java.lang.Exception
Format some characters with the font setting.
Parameters:
startIndex - The start index.
length - The length.
font - The font setting.
flag - The flag of the font setting.

characters

public FontSetting characters(int startIndex, int length)
Returns a Characters object that represents a range of characters within the comment text.
Parameters:
startIndex - The index of the start of the character.
length - The number of characters.
Returns:
Characters object.

Example:

FontSetting fontSetting = comment1.characters(0, 4);

getCharacters

public java.util.ArrayList getCharacters()
                       throws java.lang.Exception
Returns all Characters objects that represents a range of characters within the comment text.
Returns:
All Characters objects

Example:

ArrayList list = comment1.getCharacters();

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