TabPaintFormat

Syntax

bool TabPaintFormat(TabSheetId tTabSheet, TabPaintFormatArgs tArg)

Parameters

tTabSheet. Moniker of the table, in which cell range formatting is pasted.

tArg. Operation execution parameters.

Description

The TabPaintFormat operation copies formatting from one cell range to another cell range.

Comments

To execute the operation, in the tTabSheet field specify table moniker, and in the tArg field specify format copy parameters. The moniker can be based on the moniker of opened object instance, the table of which is worked with, following the rules:

The operation results in the logical true if the formatting is copied successfully.

Example

Below is the example of copying formatting from one range to another range. Copying is executed within the same sheet. The request contains table moniker, the cell range, from which formatting is copied, and the cell range, for which the copied formatting is applied. The response contains whether cell formatting is copied successfully.

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">
<TabPaintFormat xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTabSheet xmlns="">
  <id>DJDINJDAHBDFGOAEJGMHIDGBBBECGIMEIKPHMNGNGOLDEPKK!M!S!PKDOKANDAHBDFGOAECAJHLMIOFHLOEMAELLJEFFONACLGHACB!1</id>
  </tTabSheet>
<tArg xmlns="">
<src>
  <left>0</left>
  <top>0</top>
  <width>2</width>
  <height>2</height>
  <type>Cells</type>
  </src>
<dst>
  <left>4</left>
  <top>0</top>
  <width>2</width>
  <height>2</height>
  <type>Cells</type>
  </dst>
  <k>1</k>
  </tArg>
  </TabPaintFormat>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"TabPaintFormat" :
{
"tTabSheet" :
{
"id" : "DJDINJDAHBDFGOAEJGMHIDGBBBECGIMEIKPHMNGNGOLDEPKK!M!S!PKDOKANDAHBDFGOAECAJHLMIOFHLOEMAELLJEFFONACLGHACB!1"
},
"tArg" :
{
"src" :
{
"left" : "0",
"top" : "0",
"width" : "2",
"height" : "2",
"type" : "Cells"
},
"dst" :
{
"left" : "4",
"top" : "0",
"width" : "2",
"height" : "2",
"type" : "Cells"
},
"k" : "1"
}
}
}

JSON response:

{
"TabPaintFormatResult" : "1"
}
public static bool TabPaintFormat(string moniker, uint sheetKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tFormat = new TabPaintFormat()
{
tArg = new TabPaintFormatArgs()
{
src = new TabComplexRange()
{
left = 0,
top = 0,
width = 2,
height = 2,
type = TabRangeType.Cells
},
dst = new TabComplexRange()
{
left = 4,
top = 0,
width = 2,
height = 2,
type = TabRangeType.Cells
},
k = sheetKey
},
tTabSheet = new TabSheetId() { id = moniker + "!" + sheetKey }
};
// Copy formatting of one cell range to another cell range
var result = somClient.TabPaintFormat(tFormat);
return result;
}

See also:

Table: Operations