FarPoint.Win.Spread.NamedStyle above = new FarPoint.Win.Spread.NamedStyle();
FarPoint.Win.Spread.NamedStyle below = new FarPoint.Win.Spread.NamedStyle();
above.BackColor = Color.Red;
below.BackColor = Color.Yellow;
FarPoint.CalcEngine.Expression one;
FarPoint.CalcEngine.Expression two;
FarPoint.CalcEngine.Expression oneplustwo;
one = new FarPoint.CalcEngine.DoubleExpression(100.0);
two = new FarPoint.CalcEngine.DoubleExpression(20.0);
oneplustwo = new FarPoint.CalcEngine.BinaryOperatorExpression(FarPoint.CalcEngine.BinaryOperatorInfo.AddOperator, one, two);
fpSpread1.ActiveSheet.SetExpression(1, 1, oneplustwo);
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, above, FarPoint.Win.Spread.ComparisonOperator.GreaterThan, one, two);
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, below, FarPoint.Win.Spread.ComparisonOperator.LessThan, one, two);
FarPoint.Win.Spread.ConditionalFormat[]cf;
cf = fpSpread1.ActiveSheet.GetConditionalFormats(1, 1);
foreach (FarPoint.Win.Spread.ConditionalFormat item in cf)
{
MessageBox.Show(item.LastConditionExpression.ToString());
}