FarPoint.Web.Spread.NamedStyle above = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.NamedStyle below = new FarPoint.Web.Spread.NamedStyle();
above.BackColor = Color.Red;
below.BackColor = Color.Yellow;
FarPoint.CalcEngine.Expression one;
FarPoint.CalcEngine.Expression two;
FarPoint.CalcEngine.Expression oneplustwo;
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm;
one = new FarPoint.CalcEngine.DoubleExpression(100);
two = new FarPoint.CalcEngine.DoubleExpression(20);
oneplustwo = new FarPoint.CalcEngine.BinaryOperatorExpression(FarPoint.CalcEngine.BinaryOperatorInfo.AddOperator, one, two);
dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
dm.SetExpression(1, 1, oneplustwo);
FpSpread1.ActiveSheetView.SetConditionalFormat(1, 1, above, FarPoint.Web.Spread.ComparisonOperator.GreaterThan, one, two);
FpSpread1.ActiveSheetView.SetConditionalFormat(1, 1, below, FarPoint.Web.Spread.ComparisonOperator.LessThan, one, two);
FarPoint.Web.Spread.ConditionalFormat[] cf;
FarPoint.Web.Spread.ConditionalFormat item = new FarPoint.Web.Spread.ConditionalFormat();
cf = FpSpread1.ActiveSheetView.GetConditionalFormats(1, 1);
foreach (int item in cf) {
string msg = "The first expression is " + item.FirstConditionExpression.ToString();
Response.Write("alert('" + msg + "')");
}