StyleSheetItemMetadata GetStyleSheetItem(string mon)
mon. Moniker of single style in styles table.
The GetStyleSheetItem operation gets information about a single styles table style.
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.
Below is the example of getting information about a styles table style. The request contains style moniker. The response contains information and style settings.
{
"GetStyleSheetItem" :
{
"mon" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE!2"
}
}
{
"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: