Sets conditional formatting on a specified range of cells on the sheet based on a specified formula.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim style As NamedStyle
Dim formula As String
Dim value As Boolean
value = instance.SetFormulaConditionalFormat(row, column, rowCount, columnCount, style, formula) |
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 formula evaluates to true
- formula
- Formula for the condition
Example
This sets a conditional format for the specified cell.
C# | Copy Code |
---|
FarPoint.Win.Spread.NamedStyle style = new FarPoint.Win.Spread.NamedStyle();
style.BackColor = Color.Cyan;
fpSpread1.ActiveSheet.SetFormulaConditionalFormat(0, 0, 2, 2, style, "A1 = 10");
fpSpread1.ActiveSheet.Cells[0, 0].Value = 10; |
Visual Basic | Copy Code |
---|
Dim style As New FarPoint.Win.Spread.NamedStyle
style.BackColor = Color.Cyan
FpSpread1.ActiveSheet.SetFormulaConditionalFormat(0, 0, 2, 2, style, "A1 = 10")
FpSpread1.ActiveSheet.Cells(0, 0).Value = 10
|
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