Namespace EasyXLS

Class ExcelConditionalFormatting


  • public class ExcelConditionalFormatting
    extends System.Object
    This class stores the conditional formatting information like cells range and conditions.
    • Constructor Summary

      Constructors 
      Constructor Description
      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

      Modifier and Type Method Description
      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.
      void addCondition​(ExcelCondition condition)
      Adds a new condition.
      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.