TabRangeCopyResult TabRangeCopy(string mon, TabRangeCopyArg tArg)
mon. Moniker for working with table cell range.
tArg. Parameters for copying cell range.
The TabRangeCopy operation copies cell range contents.
The operation copies text, formulas and cell range formatting. To execute the operation, in the mon field specify regular report instance moniker with the !Sheets!sheet key!range address postfix.
The operation results in the collection of single elements containing copied data. To paste, use the TabRangePaste operation.
Below is the example of copying cell range contents. The request contains range moniker and the format of copied data. The response contains range contents as a byte stream.
{
"TabRangeCopy" :
{
"mon" : "S1!M!S!P1!Sheets!1!C0:D3",
"tArg" :
{
"type" : "1"
}
}
}
{
"TabRangeCopyResult" :
{
"data" :
{
"it" :
{
"@type" : "1",
"data" : "egAAAAMAAAB4nNVV2w3CMAw8O33t0wFQB2AH+KmE1C8WoKMwSgdgIj6AhORKmgrxWWIpVWK7zl0udadhf4c1hTcThlsXiOyG0j47nHHCEYNzdQ0wvoM2NM6Laz+1bbuLB4vI0xq+mItdDnj4md9canV159ckdWjqMIlD4i2UHhFlQPKmRhomokYxM6b2UWepmpmnLvGf0XPEwhT+1O10y7NHih5r9BpAu6IO7DKDF0wTdcos1CE3TdSpyHdDdSr9pQ7PnB16rY4JANjHya8m6nzbAj9\/\/qZIrQlUt5SuwEq6JOMF7LZ1uw=="
}
}
}
}
public static TabRangeCopyResult CopyTabRange(string moniker, string sheetKey, string address)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new TabRangeCopy()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address,
tArg = new TabRangeCopyArg()
{
type = 1
}
};
// Copy cell range
var result = somClient.TabRangeCopy(tTab);
return result;
}
See also: