bool TabValidateFormula(TabSheetId tTabSheet, string formula)
tTabSheet. Table moniker.
formula. Expression that must be checked whether it can be used on conditional format.
The TabValidateFormula operation checks expression used in conditional format.
To execute the operation, in the tTabSheet field specify table moniker and in the formula field specify checked expression. The moniker can be based on the moniker of opened object instance, the table of which is worked with, following the rules:
'Express report instance moniker'!Tab. Express report table (if express report has one sheet).
'Express report instance moniker'!Sheets!'Sheet key'!Tab. table of specified express report sheet (if express report has several sheets).
'Workbook instance moniker'!Tab. Workbook table (if workbook has one sheet).
'Workbook instance moniker'!Sheets!'Sheet key'!Tab. Table of specified workbook sheet (if workbook has several sheets).
'Workbook instance moniker'!CorrTab. Table with correlation matrix.
'Workbook instance moniker'!CoeffTab. Table with equation coefficients.
'Workbook instance moniker'!WeightsTab. Table with weight matrix.
'Regular report instance moniker'!Sheet key. Table of specified regular report sheet.
The result of operation execution is the true logical, if the expression is available for conditional format and the false logical, if the expression is incorrect.
Below is the example checking whether it is possible to use the expression in conditional format. The request contains table moniker and expression. The response contains the attribute indicating that the expression is correct for conditional format.
{
"TabValidateFormula" :
{
"tTabSheet" :
{
"id" : "PIHBEDBNELDPFOAEFEDCEMJBFINKCAOEMIHGHJAAHDLLJOHF!M!S!PLFPLFNBNELDPFOAEFCLGLLHBNEKHIFKEJIADGEJBNAOOBCCB!1"
},
"formula" : "Value>(A1+B1)*C1"
}
}
{
"TabValidateFormulaResult" : "1"
}
public static bool ValidateFormula(string moniker, string formula)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tVal = new TabValidateFormula()
{
formula = formula,
tTabSheet = new TabSheetId() { id = moniker }
};
// Check format
var result = somClient.TabValidateFormula(tVal);
return result;
}
See also: