bool TabRangeInsert(string mon, TabRangeShiftArg tArg)
mon. Moniker for working with table cell range.
tArg. Parameters for shifting rows/columns on inserting cell range.
The TabRangeInsert operation inserts cell range with shifting of other table elements.
The operation shifts table rows and columns by inserting the corresponding number of rows/columns in the range area passed in the moniker. To execute the operation, in the mon field specify moniker of regular report instance with the !Sheets!sheet key!range address postfix. The operation results in the logical True if cell merge was canceled successfully.
Below is the example of inserting the range on the regular report sheet with shifting rows down. The request contains moniker for working with range. The response contains whether the operation is executed successfully.
{
"TabRangeInsert" :
{
"mon" : "S1!M!S!P1!Sheets!1!A20:B25",
"tArg" :
{
"shift" : "2"
}
}
}
{
"TabRangeInsertResult" : "1"
}
public static bool InsertRange(string moniker, string sheetKey, string address)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new TabRangeInsert()
{
tArg = new TabRangeShiftArg()
{
shift = 2
},
mon = moniker + "!Sheets!" + sheetKey + '!' + address
};
// Insert range
var result = somClient.TabRangeInsert(tTab);
return result;
}
See also: