Sets conditional formatting for a specified range of cells on the sheet based on a specified comparison.
Syntax
Parameters
- row
- Starting row index
- column
- Starting column index
- rowCount
- Number of rows
- columnCount
- Number of columns
- style
- Style to be applied to the cell if the condition is satisfied
- op
- Comparison operator to apply to the cell value and the parameter value
Example
This example applies a conditional format.
C# | Copy Code |
---|
FarPoint.Win.Spread.NamedStyle styleCold = new FarPoint.Win.Spread.NamedStyle();
styleCold.BackColor = Color.Red;
styleCold.ForeColor = Color.White;
fpSpread1.ActiveSheet.SetConditionalFormat(0, 0, 2, 2, styleCold, FarPoint.Win.Spread.ComparisonOperator.IsTrue);
fpSpread1.ActiveSheet.Cells[1, 1].Formula = "ISBLANK(A1)"; |
Visual Basic | Copy Code |
---|
Dim styleCold As New FarPoint.Win.Spread.NamedStyle
styleCold.BackColor = Color.Red
styleCold.ForeColor = Color.White
FpSpread1.ActiveSheet.SetConditionalFormat(0, 0, 2, 2, styleCold, FarPoint.Win.Spread.ComparisonOperator.IsTrue)
FpSpread1.ActiveSheet.Cells(1, 1).Formula = "ISBLANK(A1)" |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also