SetTabSheetDataResult SetTabSheetData(TabSheetId tTabSheet, SetTabSheetDataArg tArg)
tTabSheet. Table moniker.
tArg. Parameters for changing data and metadata.
The SetTabSheetData operation changes data and metadata of a table.
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:
'Express report instance moniker'!Tab. Express report table (if express report has one sheet).
'Express report instance moniker'!Sheets!'Sheet key'!Tab. table of specified express report sheet (if express report has several sheets).
'Workbook instance moniker'!Tab. Workbook table (if workbook has one sheet).
'Workbook instance moniker'!Sheets!'Sheet key'!Tab. Table of specified workbook sheet (if workbook has several sheets).
'Workbook instance moniker'!CorrTab. Table with correlation matrix.
'Workbook instance moniker'!CoeffTab. Table with equation coefficients.
'Workbook instance moniker'!WeightsTab. Table with weight matrix.
'Regular report instance moniker'!Sheet key. Table of specified regular report sheet.
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.
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.
{ "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" } } } } }
{ "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: