GetStyleSheetItem

Syntax

StyleSheetItemMetadata GetStyleSheetItem(string mon)

Parameters

mon. Moniker of single style in styles table.

Description

The GetStyleSheetItem operation gets information about a single styles table style.

Comments

To execute the operation, in the mon field specify moniker of opened styles table instance with the !<style number> postfix. The moniker can be obtained on executing the OpenStyleSheet operation.

The operation results in the metadata of the specified style from styles table.

Example

Below is the example of getting information about a styles table style. The request contains style moniker. The response contains information and style settings.

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">
<GetStyleSheetItem xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE!2</mon>
  </GetStyleSheetItem>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetStyleSheetItemResult 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">
<h xmlns="">
  <key>2</key>
  <tag>TAB</tag>
<name>Style1</name>
  <id>I2</id>
  </h>
<style UNS="2">
  <Text HA="-1" VA="-1" WW="-1" Mmm="-1.00 -1.00 -1.00 -1.00" />
  <Font F="Arial" S="12" I="true" H="18" />
  <Borders />
  <Hyperlink />
  <ContainerInfo key="2" sheetType="0" />
  </style>
  </GetStyleSheetItemResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetStyleSheetItem" :
{
"mon" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE!2"
}
}

JSON response:

{
"GetStyleSheetItemResult" :
{
"h" :
{
"key" : "2",
"tag" : "TAB",
"name" : "Style1",
"id" : "I2"
},
"style" :
{
"@UNS" : "2",
"Text" :
{
"@VA" : "-1",
"@Mmm" : "-1.00 -1.00 -1.00 -1.00",
"@HA" : "-1",
"@WW" : "-1"
},
"Font" :
{
"@S" : "12",
"@F" : "Arial",
"@H" : "18",
"@I" : "true"
},
"Borders" : "",
"Hyperlink" : "",
"ContainerInfo" :
{
"@key" : "2",
"@sheetType" : "0"
}
}
}
}
public static StyleSheetItemMetadata GetStyleSheetItem(string moniker, ulong styleNumber)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetStyleSheetItem()
{
mon = moniker + '!' + styleNumber
};
// Get information about styles in styles table
var result = somClient.GetStyleSheetItem(tGet);
return result;
}

See also:

Working with Styles Table