Comment Range Properties
The following properties are available on CommentRange objects, which appear as expandable sub-properties of the objects that use them.
Attachments
Comments
| Property | Type | Default | Description |
|---|---|---|---|
string |
True |
Controls whether to allow comments to be added to a given cell within the comment range. AllowAdd can be specified as a formula that evaluates to True or False. |
|
bool |
true |
Controls whether to allow comments. A comment range can allow comments and/or allow attachments. |
|
string |
False |
Controls whether to allow comments that have already been saved to be deleted. AllowDelete can be specified as a formula that evaluates to True or False. The following tokens are available for the current comment: [T.Comment.CreatedBy], [T.Comment.CreatedDate], [T.Comment.UpdatedBy], [T.Comment.UpdatedDate]. |
|
string |
False |
Controls whether to allow comments that have already been saved to be updated. AllowUpdate can be specified as a formula that evaluates to True or False. The following tokens are available for the current comment: [T.Comment.CreatedBy], [T.Comment.CreatedDate], [T.Comment.UpdatedBy], [T.Comment.UpdatedDate]. |
|
bool |
false |
Controls whether the other comment ranges should automatically be searched for the same comment when a comment in this comment range is added/changed/deleted. If found, the comment value within the other comment range on the sheet will be updated to reflect the change to the comment in this comment range. Since there can be a signficant performance impact when this setting is True, the setting should only be set to True when comments in this comment range also exist in one or more of the other comment ranges based on an exact match of the resolved key item string. |
|
bool |
true |
Determines whether existing cell values are retained when comments are written to the worksheet. |
|
CommentIndicatorPolicy |
CommentIndicatorPolicy.ExcelComment |
Controls what to use for a comment indicator on cells that have comments. ExcelComment - An Excel comment is added to a cell, which has associated comments, and displays the text of all the comments. The ExcelFormat setting controls the presentation of the comments. CommentIndicator - This option has been deprecated. None - No comment indicator is presented. |
|
bool |
true |
Whether to show the LoadComments button in the comments explorer when the active cell is in a comment range but the comments have not been loaded yet. |
|
CommentCommitPolicy |
CommentCommitPolicy.OnCellInput |
Specifies the commit behavior for the comments in the comment range.
|
|
CommentEditPolicy |
CommentEditPolicy.EditInCommentsExplorer |
Specifies how comments may be edited.
|
|
string |
Default valueComments cannot be entered before comments have been loaded. Load comments now? |
The message to prompt with when something is entered into a comment cell and the comment range has not been loaded yet. If this property is left blank the EntryWhenNotLoadedPolicy will be executed without prompting the user. |
|
CommentEntryWhenNotLoadedPolicy |
CommentEntryWhenNotLoadedPolicy.PromptForLoad |
Specifies what to do when something is entered into a comment cell and the comment range has not been loaded yet.
|
|
CommentExcelFormat |
CommentExcelFormat.Comment |
Specifies how to display the comments in an Excel comment.
|
|
CommentInCellDisplayPolicy |
CommentInCellDisplayPolicy.None |
Specifies how to display comments within each cell of the comment range.
|
|
CommentLoadPolicy |
CommentLoadPolicy.LoadAllOnBuild |
Specifies when to load the comments of the specified range.
|
|
int |
-1 |
The maximum number of characters to display of each comment in the comment cell. Enter -1 for no limit. |
|
CommentSortPolicy |
CommentSortPolicy.DateAscending |
Specifies how to sort comments when displayed in Excel Comments or in the Comments Explorer.
This property is overridden by InCellDisplayPolicy (unless the InCellDisplayPolicy=None). |
|
bool |
false |
Controls whether a numeric comment is stored in the cell as a number or as text. The default setting is False, which results in numeric comments being stored as text. When the setting is True, number formatting can be used to format the values. |
|
CommentThreadPolicy |
CommentThreadPolicy.ThreadedMultipleRootComments |
Specifes the ThreadPolicy for comments in this range.
|
General
| Property | Type | Default | Description |
|---|---|---|---|
string |
Identifies each comment range definition in the Comment Range Configurations Editor of the View Metadata Editor and the Comment Range Editor of the View Template Designer. Unique Captions are not required. However, it is strongly recommened to make them unique, per view, to avoid confusion. Caption is not used at run time. |
||
string |
g |
Specifies the format used when displaying a date, such as the created or last modified date, in the Comments Explorer or an Excel comment. The DateFormat value can either be a standard or a custom format string. The default value, g, combines the short date and short time patterns, as defined by the view’s culture, separated by a space. A standard format string consists of a single format character specifier from the following list of standard format specifiers. The patterns are influenced by the view’s culture, which defines the short and long patterns as well as the date separator and time separator. With the following standard format specifiers, the displayed time is the local time. The examples are based on the United States (English) culture: d: Short date pattern, 4/9/2009 D: Long date pattern, Thursday, April 09, 2009 t: Short time pattern, 7:53 PM T: Long time pattern, 7:53:03 PM f: Combination of long date and short time patterns separated by a space, Thursday, April 09, 2009 7:53 PM F: Full date/time pattern, Thursday, April 09, 2009 7:53:03 PM g: Combination of short date and short time patterns separated by a space, 4/9/2009 7:53 PM G: Combination of short date and long time patterns separated by a space, 4/9/2009 7:53:03 PM The format specifiers are based on the .NET framework conventions. Refer to the following links for more information about standard and custom format specifiers, all of which are supported for the DateFormat property: |
|
bool |
false |
Controls whether to apply the same configuration to all ranges of defined names that start the same Range name and end with a period followed by an integer. |
|
bool |
false |
Linking
| Property | Type | Default | Description |
|---|---|---|---|
string |
The address of the range that contains the comments. The Address is typically a defined name, and must be a defined name when SequentialRanges is True. |
||
ArrayList of NamedKeyValuePair |
Key items that are the same for all comments in the range. BaseKeyItems should typically only be used when the KeyItemsConditionString is not used and the KeyItemsString is not a formula that excludes cells within the comment range. |
||
string |
The context string is stored with each comment. It can be used to capture context specific information that may be important to understanding the comment. A formula can be used to specify this string. |
||
bool |
true |
Whether to automatically hide the key items row and key items column at run-time. |
|
string |
A single-column vertical range on the worksheet that holds the key items of each row. Use KeyItemsColumnRange in conjunction with KeyItemsRowRange to define key items for each intersecting cell in the comment range. When KeyItemsColumnRange or KeyItemsRowRange are used, the KeyItemsString property is ignored. |
||
string |
True |
A string that evaluates to True or False and controls whether the KeyItemsString is evaluated for any given cell within the comment range. When used, the KeyItemsConditionString is typically a formula. For example, the following formula excludes blank and locked cells within the comment range: =Not(Or(IsBlank(@ACell()), @CellIsLocked())) Alternatively, the condition can be included in the KeyItemsString formula using the Excel IF function. In cases where many of the cells within the comment range are excluded from having comments, performance can sometimes be improved by using the KeyItemsConditionString instead of including the same condition in the KeyItemsString. |
|
string |
A single-row horizontal range on the worksheet that holds the key items of each column. Use KeyItemsRowRange in conjunction with KeyItemsColumnRange to define key items for each intersecting cell in the comment range. When KeyItemsRowRange or KeyItemsColumnRange are used, the KeyItemsString property is ignored. |
||
string |
A string of key-value pairs, such as \"Product=100; Market=NorthEast; Scenario=Actual\". A formula can be used to specify this string. |