ActiveXLS v6.4.0 API Documentation

ActiveXLS
Class ExcelConditionalFormatting

System.Object
  extended byActiveXLS.ExcelConditionalFormatting

public class ExcelConditionalFormatting
extends System.Object

This class stores the conditional formatting information like cells range and conditions.


Constructor Summary
ExcelConditionalFormatting()
          Defines 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
 void addCondition(ExcelCondition condition)
          Adds a new condition.
 void addCondition(int nOperator, System.String firstFormula, System.String secondFormula)
          Adds a new condition with the specified operation and formula restrictions.
 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.
 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.
 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.
 ExcelConditionalFormatting Clone()
          Creates and returns a copy of this object.
 int ConditionCount()
          Returns the number of conditions.
 ExcelCondition getConditionAt(int index)
          Returns the condition with the specified index.
 int getFirstColumn()
          Returns the first column index of the cells range.
 int getFirstRow()
          Returns the first row index of the cells range.
 int getLastColumn()
          Returns the last column index of the cells range.
 int getLastRow()
          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.
 

Constructor Detail

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 range
firstColumn - first column index of the cells range
lastRow - last row index of the cells range
lastColumn - last column index of the cells range
lstConditions - a list of ExcelCondition objects

ExcelConditionalFormatting

public ExcelConditionalFormatting(System.String range,
                                  List lstConditions)
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 in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - 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 in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - 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 in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - the foreground of the conditional formatting font
background - 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 in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
background - the color of the conditional formatting background
Method Detail

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 range
lastRow - last row index of the cells range
firstColumn - first column index of the cells range
lastColumn - 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.

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

public void addCondition(ExcelCondition condition)
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.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - 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.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - 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.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - the foreground of the conditional formatting font
background - 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.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
background - 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

public void insertCondition(int index,
                            ExcelCondition condition)
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.

Returns:
the number of conditions
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), getConditionAt(int)

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

public ExcelCondition getConditionAt(int index)
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

public ExcelConditionalFormatting Clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

Copyright 2009 On Time Computing Solutions