Namespace EasyXLS
Class ExcelConditionalFormatting
System.Object
EasyXLS.ExcelConditionalFormatting
public class ExcelConditionalFormatting
extends System.Object
This class stores the conditional formatting information like cells range and conditions.
-
Constructor Summary
ConstructorDescriptionDefines an instance of the conditional formatting.ExcelConditionalFormatting(int firstRow, int firstColumn, int lastRow, int lastColumn, List lstConditions)
Defines an instance of the conditional formatting having the specified range.ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula)
Defines an instance of the conditional formatting having the specified position, operator and formula restrictions.ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)
Defines an instance of the conditional formatting having the specified position, operator, formula restrictions and font settings.ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)
Defines an instance of the conditional formatting having the specified position, operator, formula restrictions, font settings and background.ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)
Defines an instance of the conditional formatting having the specified position, operator, formula restrictions and background.ExcelConditionalFormatting(System.String range, List lstConditions)
Defines an instance of the conditional formatting on the specified range. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCondition(int nOperator, System.String firstFormula, System.String secondFormula)
Adds a new condition with the specified operation and formula restrictions.
This method is overridden as addCondition_2 in COM+ version of EasyXLS.
void
addCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)
Adds a new condition with the specified operation, formula restrictions and font settings.
This method is overridden as addCondition_3 in COM+ version of EasyXLS.
void
addCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)
Adds a new condition with the specified operation, formula restrictions, font settings and background.
This method is overridden as addCondition_4 in COM+ version of EasyXLS.
void
addCondition(int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)
Adds a new condition with the specified operation, formula restrictions, background.
This method is overridden as addCondition_5 in COM+ version of EasyXLS.
void
addCondition(ExcelCondition condition)
Adds a new condition.Clone()
Creates and returns a copy of this object.int
Returns the number of conditions.getConditionAt(int index)
Returns the condition with the specified index.int
Returns the first column index of the cells range.int
Returns the first row index of the cells range.int
Returns the last column index of the cells range.int
Returns the last row index of the cells range.System.String
getRange()
Returns the range where the conditional formatting will be aplied.void
insertCondition(int index, ExcelCondition condition)
Inserts a new condition.void
removeCondition(int index)
Removes the condition with the specified index.void
setFirstColumn(int firstColumn)
Sets the first column of the cell range where the conditional formatting will be applied.void
setFirstRow(int firstRow)
Sets the first row of the cell range where the conditional formatting will be applied.void
setLastColumn(int lastColumn)
Sets the last column of the cell range where the conditional formatting will be applied.void
setLastRow(int lastRow)
Sets the last row of the cell range where the conditional formatting will be applied.void
setRange(int firstRow, int firstColumn, int lastRow, int lastColumn)
Sets the range where the conditional formatting is applied.void
setRange(System.String range)
Sets the range where the conditional formatting is applied.
This method is overridden as setRange_2 in COM+ version of EasyXLS.
Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExcelConditionalFormatting
public ExcelConditionalFormatting()Defines an instance of the conditional formatting. -
ExcelConditionalFormatting
public ExcelConditionalFormatting(int firstRow, int firstColumn, int lastRow, int lastColumn, List lstConditions)Defines an instance of the conditional formatting having the specified range.- Parameters:
firstRow
- first row index of the cells rangefirstColumn
- first column index of the cells rangelastRow
- last row index of the cells rangelastColumn
- last column index of the cells rangelstConditions
- a list of ExcelCondition objects
-
ExcelConditionalFormatting
Defines an instance of the conditional formatting on the specified range.- Parameters:
range
- the area location of the conditional formatting. It can be a cell reference or a range.lstConditions
- a list of ExcelCondition objects
-
ExcelConditionalFormatting
public ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula)Defines an instance of the conditional formatting having the specified position, operator and formula restrictions.- Parameters:
range
- the area location of the conditional formatting. It can be a cell reference or a range.nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formula
-
ExcelConditionalFormatting
public ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)Defines an instance of the conditional formatting having the specified position, operator, formula restrictions and font settings.- Parameters:
range
- the area location of the conditional formatting. It can be a cell reference or a range.nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulaisBold
- the bold setting of the conditional formatting fontisItalic
- the italic setting of the conditional formatting fontforeground
- the foreground of the conditional formatting font
-
ExcelConditionalFormatting
public ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)Defines an instance of the conditional formatting having the specified position, operator, formula restrictions, font settings and background.- Parameters:
range
- the area location of the conditional formatting. It can be a cell reference or a range.nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulaisBold
- the bold setting of the conditional formatting fontisItalic
- the italic setting of the conditional formatting fontforeground
- the foreground of the conditional formatting fontbackground
- the color of the conditional formatting background
-
ExcelConditionalFormatting
public ExcelConditionalFormatting(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)Defines an instance of the conditional formatting having the specified position, operator, formula restrictions and background.- Parameters:
range
- the area location of the conditional formatting. It can be a cell reference or a range.nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulabackground
- the color of the conditional formatting background
-
-
Method Details
-
getRange
public System.String getRange()Returns the range where the conditional formatting will be aplied.- Returns:
- the range where the conditional formatting will be aplied
- See Also:
getFirstRow()
,getLastRow()
,getFirstColumn()
,getLastColumn()
-
setFirstRow
public void setFirstRow(int firstRow)Sets the first row of the cell range where the conditional formatting will be applied.- Parameters:
firstRow
- the first row of the cell range where the conditional formatting will be applied- See Also:
getFirstRow()
,setLastRow(int)
,setFirstColumn(int)
,setLastColumn(int)
,setRange(int,int,int,int)
,setRange(String)
-
getFirstRow
public int getFirstRow()Returns the first row index of the cells range.- Returns:
- the first row index of the cells range
- See Also:
setFirstRow(int)
,getLastRow()
,getFirstColumn()
,getLastColumn()
,setRange(int,int,int,int)
,setRange(String)
-
setLastRow
public void setLastRow(int lastRow)Sets the last row of the cell range where the conditional formatting will be applied.- Parameters:
lastRow
- the last row of the cell range where the conditional formatting will be applied- See Also:
getLastRow()
,setFirstRow(int)
,setFirstColumn(int)
,setLastColumn(int)
,setRange(int,int,int,int)
,setRange(String)
-
getLastRow
public int getLastRow()Returns the last row index of the cells range.- Returns:
- the last row index of the cells range
- See Also:
setLastRow(int)
,getFirstRow()
,getFirstColumn()
,getLastColumn()
,setRange(int,int,int,int)
,setRange(String)
-
setFirstColumn
public void setFirstColumn(int firstColumn)Sets the first column of the cell range where the conditional formatting will be applied.- Parameters:
firstColumn
- the first column of the cell range where the conditional formatting will be applied- See Also:
getFirstColumn()
,setFirstRow(int)
,setLastRow(int)
,setLastColumn(int)
,setRange(int,int,int,int)
,setRange(String)
-
getFirstColumn
public int getFirstColumn()Returns the first column index of the cells range.- Returns:
- the first column index of the cells range
- See Also:
setFirstColumn(int)
,getFirstRow()
,getLastRow()
,getLastColumn()
,setRange(int,int,int,int)
,setRange(String)
-
setLastColumn
public void setLastColumn(int lastColumn)Sets the last column of the cell range where the conditional formatting will be applied.- Parameters:
lastColumn
- the last column of the cell range where the conditional formatting will be applied- See Also:
getLastColumn()
,setFirstRow(int)
,setLastRow(int)
,setFirstColumn(int)
,setRange(int,int,int,int)
,setRange(String)
-
getLastColumn
public int getLastColumn()Returns the last column index of the cells range.- Returns:
- the last column index of the cells range
- See Also:
setLastColumn(int)
,getFirstRow()
,getLastRow()
,getFirstColumn()
,setRange(int,int,int,int)
,setRange(String)
-
setRange
public void setRange(int firstRow, int firstColumn, int lastRow, int lastColumn)Sets the range where the conditional formatting is applied.- Parameters:
firstRow
- first row index of the cells rangelastRow
- last row index of the cells rangefirstColumn
- first column index of the cells rangelastColumn
- last column index of the cells range- See Also:
setRange(String)
,getFirstRow()
,getLastRow()
,getFirstColumn()
,getLastColumn()
-
setRange
public void setRange(System.String range)Sets the range where the conditional formatting is applied.
This method is overridden as setRange_2 in COM+ version of EasyXLS.
- Parameters:
range
- the position where the conditional formatting is applied. It can be a cell reference or a range.- See Also:
setRange(int,int,int,int)
,getFirstRow()
,getLastRow()
,getFirstColumn()
,getLastColumn()
-
addCondition
Adds a new condition.- Parameters:
condition
- the condition and its settings- See Also:
addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
addCondition
public void addCondition(int nOperator, System.String firstFormula, System.String secondFormula)Adds a new condition with the specified operation and formula restrictions.
This method is overridden as addCondition_2 in COM+ version of EasyXLS.
- Parameters:
nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formula- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
addCondition
public void addCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)Adds a new condition with the specified operation, formula restrictions and font settings.
This method is overridden as addCondition_3 in COM+ version of EasyXLS.
- Parameters:
nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulaisBold
- the bold setting of the conditional formatting fontisItalic
- the italic setting of the conditional formatting fontforeground
- the foreground of the conditional formatting font- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
addCondition
public void addCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)Adds a new condition with the specified operation, formula restrictions, font settings and background.
This method is overridden as addCondition_4 in COM+ version of EasyXLS.
- Parameters:
nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulaisBold
- the bold setting of the conditional formatting fontisItalic
- the italic setting of the conditional formatting fontforeground
- the foreground of the conditional formatting fontbackground
- the color of the conditional formatting background- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
addCondition
public void addCondition(int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)Adds a new condition with the specified operation, formula restrictions, background.
This method is overridden as addCondition_5 in COM+ version of EasyXLS.
- Parameters:
nOperator
- the conditional formatting operator. Possible values are available inConditionalFormatting
class.firstFormula
- the conditional formatting first formulasecondFormula
- the conditional formatting second formulabackground
- the color of the conditional formatting background- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
insertCondition
Inserts a new condition.- Parameters:
index
- the index where the condition will be inserted in the rule list.condition
- the condition and its settings- See Also:
addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,getConditionAt(int)
,ConditionCount()
-
ConditionCount
public int ConditionCount()Returns the number of conditions. -
removeCondition
public void removeCondition(int index)Removes the condition with the specified index.- Parameters:
index
- the index of the condition that will be removed- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,getConditionAt(int)
,ConditionCount()
-
getConditionAt
Returns the condition with the specified index.- Parameters:
index
- the index of the returned condition- Returns:
- the condition with the specified index
- See Also:
addCondition(ExcelCondition)
,addCondition(int,String,String)
,addCondition(int,String,String,Color)
,addCondition(int,String,String,bool,bool,Color)
,addCondition(int,String,String,bool,bool,Color,Color)
,removeCondition(int)
,ConditionCount()
-
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-