bool CopyTabTableStyleToRange(string mon, string styleName)
mon. Moniker for working with table cell range.
styleName. Name of the style to be copied.
The CopyTabTableStyleToRange operation copies style and applies its copy to a call range.
To execute the operation, in the mon field specify moniker of regular report instance with the !Sheets!sheet key!range address postfix, and in the styleName field specify name of the style to be copied.
The operation results in the logical True if style copying and applying its copy to a cell range succeeded.
Below is the example of copying style and applying its copy to a cell range. The request contains cell range moniker and name of the copied style. The response contains whether style copy is successfully applied to a cell range.
{
"CopyTabTableStyleToRange" :
{
"mon" : "JMHNJCPPENOAGOAEKKAIOMBCNHKFGLBECJGOILNNKEBNHDNH!M!S!POMEOEHPPENOAGOAEHHAFJNMHPFBDKBJEDIHOKONCJJDDJEHC!Sheets!1!E0:G5",
"styleName" : "EAX table style"
}
}
{
"CopyTabTableStyleToRangeResult" : "1"
}
public static bool CopyTabTableStyleToRange(string moniker, string sheetKey, string address, string copiedStyleName)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCopy = new CopyTabTableStyleToRange()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address,
styleName = copiedStyleName
};
// Copy style and apply copy to cell range
var result = somClient.CopyTabTableStyleToRange(tCopy);
return result;
}
See also: