TabRangePaste

Syntax

bool TabRangePaste(string mon, TabRangePasteArg tArg)

Parameters

mon. Moniker for working with table cell range.

tArg. Parameters for pasting cell range.

Description

The TabRangePaste operation pastes copied data to cell range.

Comments

The operation pastes the data to the cell range, which was copied or cut using the TabRangeCopy/TabRangeCut operations. To execute the operation, in the mon field specify regular report instance moniker with the !Sheets!sheet key!range address postfix that determines the cell range, to which data is pasted. In the tArg field set paste mode and data to be pasted.

The operation results in the logical True if data was pasted successfully.

Example

Below is the example of pasting the copied or cut cell range. The request contains moniker of the range, to which data is pasted, the stream containing data to be pasted, and paste mode (text, formulas and formatting). The response contains whether data is successfully pasted.

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">
<TabRangePaste xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!Sheets!1!G0:H3</mon>
<tArg xmlns="">
<data>
<it type="1">
  <data>egAAAAMAAAB4nN2UzQ3CMAyFX5z0Z58OgDoAO8AFCaknFqBswigdgIk4AHFil5AKcSytJbeN7Sb++lQP3fYOb4RoVpzXDondUPhrixOO2KPjUFsDfUj6VD8uroehaZpN6rqJeXrDF+PceYdHfIqHm4p43/E1kwcoD9gsYNIjSCMXQybgSF/LxlNGm+DROvAUje+pelbwTCji4n8mUE8FckJQhKI5NUBOgCkBSeO8KTf7WaHTgzKVisWopHyUqVQKgZtZpZJ+qaTfXif3VCUrDeh8V8YKqxgVFu+fLJWwFrwg8YwSOkwkzCpegSZ7ww==</data>
  </it>
  </data>
  <mode>15</mode>
  </tArg>
  </TabRangePaste>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <TabRangePasteResult 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</TabRangePasteResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"TabRangePaste" :
{
"mon" : "S1!M!S!P1!Sheets!1!G0:H3",
"tArg" :
{
"data" :
{
"it" :
{
"@type" : "1",
"data" : "egAAAAMAAAB4nN2UzQ3CMAyFX5z0Z58OgDoAO8AFCaknFqBswigdgIk4AHFil5AKcSytJbeN7Sb++lQP3fYOb4RoVpzXDondUPhrixOO2KPjUFsDfUj6VD8uroehaZpN6rqJeXrDF+PceYdHfIqHm4p43\/E1kwcoD9gsYNIjSCMXQybgSF\/LxlNGm+DROvAUje+pelbwTCji4n8mUE8FckJQhKI5NUBOgCkBSeO8KTf7WaHTgzKVisWopHyUqVQKgZtZpZJ+qaTfXif3VCUrDeh8V8YKqxgVFu+fLJWwFrwg8YwSOkwkzCpegSZ7ww=="
}
},
"mode" : "15"
}
}
}

JSON response:

{
"TabRangePasteResult" : "1"
}
public static bool PasteTabRange(string moniker, string sheetKey, string address, TabRangeClipboardItem[] pasteData)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new TabRangePaste()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address,
tArg = new TabRangePasteArg()
{
mode = 15,
data = pasteData
}
};
// Paste cell range
var result = somClient.TabRangePaste(tTab);
return result;
}

See also:

Table