bool SetTabRangeComment(string mon, TabRangeComment tArg)
mon. Moniker for working with table cell.
tArg. Comment setting parameters.
The SetTabRangeComment operation adds a new or changes the existing cell comment.
To execute the operation, in the mon field specify the moniker for working with cell in the following format: Regular report instance moniker!Sheets!Sheet key!absolute address. If the cell range moniker is specified, the operation is executed for the upper left cell in the range.
The operation results in the logical True if the comment was changed successfully.
Below is the example of changing a cell comment. The request contains the moniker for working with a cell the comment to be set. The response contains whether the comment is changed successfully.
{
"SetTabRangeComment" :
{
"mon" : "HBNCFAKEFPMNFOAEGJLELNECHEGOAOHEKJALPKOGKEBPFMNE!M!S!PKHDIGFKEFPMNFOAEDGNBAHBMBHMJKBNENLGGOOJBLJAKBOAO!Sheets!1!A1",
"tArg" :
{
"trc" : "Source data area"
}
}
}
{
"SetTabRangeCommentResult" : "1"
}
public static bool SetTabRangeComment(string moniker, string sheetKey, string address, string comment)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new SetTabRangeComment()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address,
tArg = new TabRangeComment()
{
trc = comment
}
};
// Change cell comment
var result = somClient.SetTabRangeComment(tTab);
return result;
}
See also: