TabRangeMetaData GetTabRangeMetaData(string mon, TabRangeMetaData tArg)
mon. Moniker for working with table cell range.
tArg. Operation execution parameters.
The GetTabRangeMetaData operation gets cell range metadata.
The operation gets information about whether there are cell merges in the range and conditional formats applied to the cell range. To execute the operation, in the mon field specify moniker of regular report instance with the !Sheets!sheet key!range address postfix. In the tArg field set empty values or default values for the fields, which values should be obtained. Specify one element for collections. To get information about a specific element, specify its key in metadata. If -1 is specified as a key value, information about all elements of this type is obtained.
The operation results in the requested cell range parameters.
Below is the example of getting cell range metadata. The request contains the cell range moniker, the response contains the requested information.
{
"GetTabRangeMetaData" :
{
"mon" : "S1!M!S!P1!Sheets!1!A0:B3",
"tArg" :
{
"merged" : "0",
"conditions" :
{
"Condition" :
{
"k" : "-1",
"id" : "",
"n" : "",
"Key" : "0",
"Type" : "Values",
"Details" : ""
}
}
}
}
}
{
"GetTabRangeMetaDataResult" :
{
"merged" : "0",
"conditions" :
{
"Condition" :
[
{
"k" : "4294967295",
"id" : "",
"n" : "",
"Key" : "0",
"Type" : "Values",
"Details" : ""
},
{
"k" : "0",
"Key" : "1",
"Type" : "CellContent",
"Range" :
{
"left" : "0",
"top" : "0",
"width" : "2",
"height" : "4"
},
"Enabled" : "1",
"Details" :
{
"CellContent" :
{
"ContentType" : "0",
"CellValue" : "1000",
"SpecificText" : "",
"Style" :
{
"@UNS" : "2",
"Text" :
{
"@VA" : "-1",
"@Mmm" : "-1.00 -1.00 -1.00 -1.00",
"@HA" : "-1",
"@M" : "-1 -1 -1 -1",
"@WW" : "-1"
},
"Font" :
{
"@B" : "true",
"@S" : "10",
"@C" : "#FF0000",
"@H" : "15"
},
"Borders" : "",
"Hyperlink" : ""
},
"ValueCondition" : "4",
"TextCondition" : "0",
"DateCondition" : "0",
"MinValue" : "",
"MaxValue" : ""
}
}
},
{
"k" : "1",
"Key" : "0",
"Type" : "CellContent",
"Range" :
{
"left" : "0",
"top" : "0",
"width" : "2",
"height" : "4"
},
"Enabled" : "1",
"Details" :
{
"CellContent" :
{
"ContentType" : "0",
"CellValue" : "100",
"SpecificText" : "",
"Style" :
{
"@UNS" : "2",
"Text" :
{
"@VA" : "-1",
"@Mmm" : "-1.00 -1.00 -1.00 -1.00",
"@HA" : "-1",
"@M" : "-1 -1 -1 -1",
"@WW" : "-1"
},
"Font" :
{
"@B" : "true",
"@S" : "10",
"@H" : "15"
},
"Borders" : "",
"Hyperlink" : ""
},
"ValueCondition" : "4",
"TextCondition" : "0",
"DateCondition" : "0",
"MinValue" : "",
"MaxValue" : ""
}
}
}
]
}
}
}
public static TabRangeMetaData GetTabRangeMetaData(string moniker, string sheetKey, string address)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new GetTabRangeMetaData()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address,
tArg = new TabRangeMetaData()
{
merged = new int(),
conditions = new TabFormatCondition[1]
{
new TabFormatCondition ()
{
k = uint.MaxValue,
id = "",
n = "",
Type = new TabConditionType(),
Details = new TabFormatConditionDetails()
}
}
}
};
// Get cell range metadata
var result = somClient.GetTabRangeMetaData(tTab);
return result;
}
See also: