SetTabSheetData

Syntax

SetTabSheetDataResult SetTabSheetData(TabSheetId tTabSheet, SetTabSheetDataArg tArg)

Parameters

tTabSheet. Table moniker.

tArg. Parameters for changing data and metadata.

Description

The SetTabSheetData operation changes table data and metadata.

Comments

To execute the operation, in the tTabSheet parameter determine table moniker, and in the tArg parameter determine parameters of data and metadata change. The moniker can be based on the moniker of opened object instance, the table of which is worked with, following the rules:

In the tArg.pattern field specify the pattern to be used to change data or metadata. In the tArg.TabSheetData field specify the updated data, and in the tArg.metaData field specify the updated metadata. In the tArg.action field also specify additional actions to be executed in the table on executing the operation. If the tArg.getArg field is defined, the result of the operation is the changed data and metadata obtained after changing it in the table.

Example

Below is the example of using the SetTabSheetData operation to change data in the specified cell range in the express report table. The request contains table moniker, new data for the cell range, and the pattern indicating whether cell data must be changed. The response contains updated information about data in the specified cell range.

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">
<SetTabSheetData xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTabSheet xmlns=" ">
  <id>S1!M!S!E1!Tab</id>
  </tTabSheet>
<tArg xmlns=" ">
<TabSheetData>
<Cells>
<Cell SI="1" T="1" L="1">
  <CD FT="" V="13.8386357" VT="8" />
  </Cell>
<Cell SI="2" T="1" L="2">
  <CD FT="" V="13.4838968" VT="8" />
  </Cell>
<Cell SI="2" T="1" L="3">
  <CD FT="" V="13.4838968" VT="8" />
  </Cell>
<Cell SI="2" T="1" L="4">
  <CD FT="" V="13.4838968" VT="8" />
  </Cell>
  </Cells>
  </TabSheetData>
<range>
  <left>1</left>
  <top>1</top>
  <width>4</width>
  <height>1</height>
  </range>
<setPattern>
  <data>true</data>
  </setPattern>
<getArg>
<pattern>
  <data>true</data>
  </pattern>
<range>
  <left>1</left>
  <top>1</top>
  <width>4</width>
  <height>1</height>
  </range>
  </getArg>
  </tArg>
  </SetTabSheetData>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetTabSheetDataResult 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">
<id xmlns=" ">
  <id>S1!M!S!E1!Tab</id>
  </id>
<sheet xmlns=" ">
<TabSheetData>
<Cells>
<Cell L="1" T="1" SI="1">
  <CD FT="13.8386357" VT="8" V="13.8386357" />
  </Cell>
<Cell L="2" T="1" SI="2">
  <CD FT="13.4838968" VT="8" V="13.4838968" />
  </Cell>
<Cell L="3" T="1" SI="2">
  <CD FT="13.4838968" VT="8" V="13.4838968" />
  </Cell>
<Cell L="4" T="1" SI="2">
  <CD FT="13.4838968" VT="8" V="13.4838968" />
  </Cell>
  </Cells>
  </TabSheetData>
  </sheet>
  </SetTabSheetDataResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
 "SetTabSheetData" : 
  {
   "tTabSheet" : 
    {
     "id" : "S1!M!S!E1!Tab"
    },
   "tArg" : 
    {
     "TabSheetData" : 
      {
       "Cells" : 
        {
         "Cell" : 
          [
            {
             "@T" : "1",
             "@SI" : "1",
             "@L" : "1",
             "CD" : 
              {
               "@V" : "13.8386357",
               "@FT" : "",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@SI" : "2",
             "@L" : "2",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@SI" : "2",
             "@L" : "3",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@SI" : "2",
             "@L" : "4",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "",
               "@VT" : "8"
              }
            }
          ]
        }
      },
     "range" : 
      {
       "left" : "1",
       "top" : "1",
       "width" : "4",
       "height" : "1"
      },
     "setPattern" : 
      {
       "data" : "true"
      },
     "getArg" : 
      {
       "pattern" : 
        {
         "data" : "true"
        },
       "range" : 
        {
         "left" : "1",
         "top" : "1",
         "width" : "4",
         "height" : "1"
        }
      }
    }
  }
}

JSON response:

{
 "SetTabSheetDataResult" : 
  {
   "id" : 
    {
     "id" : "S1!M!S!E1!Tab"
    },
   "sheet" : 
    {
     "TabSheetData" : 
      {
       "Cells" : 
        {
         "Cell" : 
          [
            {
             "@T" : "1",
             "@L" : "1",
             "@SI" : "1",
             "CD" : 
              {
               "@V" : "13.8386357",
               "@FT" : "13.8386357",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@L" : "2",
             "@SI" : "2",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "13.4838968",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@L" : "3",
             "@SI" : "2",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "13.4838968",
               "@VT" : "8"
              }
            },
            {
             "@T" : "1",
             "@L" : "4",
             "@SI" : "2",
             "CD" : 
              {
               "@V" : "13.4838968",
               "@FT" : "13.4838968",
               "@VT" : "8"
              }
            }
          ]
        }
      }
    }
  }
}
public static SetTabSheetDataResult ChangeTabData(EaxId eax, TabRange range, TabData newData)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetTabSheetData()
{
tArg = new SetTabSheetDataArg()
{
setPattern = new TabSheetPattern()
{
data = true,
},
//Changed cell range
range = range,
//New cell data
TabSheetData = newData,
getArg = new GetTabSheetDataArg()
{
pattern = new TabSheetPattern()
{
data = true,
},
range = range
}
},
tTabSheet = new TabSheetId() { id = eax.id + "!Tab" }
};
// Change chart
var result = somClient.SetTabSheetData(tSet);
return result;
}

See also:

Interactive Visual Components