SetTabRangeComment

Syntax

bool SetTabRangeComment(string mon, TabRangeComment tArg)

Parameters

mon. Moniker for working with table cell.

tArg. Comment setting parameters.

Description

The SetTabRangeComment operation adds a new or changes the existing cell comment.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetTabRangeComment xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">HBNCFAKEFPMNFOAEGJLELNECHEGOAOHEKJALPKOGKEBPFMNE!M!S!PKHDIGFKEFPMNFOAEDGNBAHBMBHMJKBNENLGGOOJBLJAKBOAO!Sheets!1!A1</mon>
<tArg xmlns="">
  <trc>Source data area</trc>
  </tArg>
  </SetTabRangeComment>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetTabRangeCommentResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetTabRangeCommentResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetTabRangeComment" :
{
"mon" : "HBNCFAKEFPMNFOAEGJLELNECHEGOAOHEKJALPKOGKEBPFMNE!M!S!PKHDIGFKEFPMNFOAEDGNBAHBMBHMJKBNENLGGOOJBLJAKBOAO!Sheets!1!A1",
"tArg" :
{
"trc" : "Source data area"
}
}
}

JSON response:

{
"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:

Table: Operations