Class XlsConditionalFormats
- Namespace
- Spire.Xls.Core.Spreadsheet.Collections
- Assembly
- Spire.XLS.dll
public class XlsConditionalFormats : CollectionExtended<IConditionalFormat>, IList<IConditionalFormat>, ICollection<IConditionalFormat>, IEnumerable<IConditionalFormat>, ICloneParent, IConditionalFormats, IEnumerable, IExcelApplication
- Inheritance
-
XlsConditionalFormats
- Implements
- Inherited Members
Fields
MAXIMUM_CF_NUMBER
public const int MAXIMUM_CF_NUMBER = 3
Field Value
Properties
Address
public string Address { get; }
Property Value
AddressR1C1
public string AddressR1C1 { get; }
Property Value
Capacity
public int Capacity { get; set; }
Property Value
CellRectangles
public List<Rectangle> CellRectangles { get; }
Property Value
Count
public int Count { get; }
Property Value
IsEmpty
public bool IsEmpty { get; }
Property Value
this[int]
public IConditionalFormat this[int fieldIndex] { get; }
Parameters
fieldIndex
int
Property Value
Methods
AddAverageCondition(AverageType)
Add new above or below the average condition to the collection.
public IConditionalFormat AddAverageCondition(AverageType averageType)
Parameters
averageType
AverageTypetype of the average
Returns
AddBeginsWithCondition(string)
Add new begin with condition to the collection.
public IConditionalFormat AddBeginsWithCondition(string text)
Parameters
text
stringbegin with text
Returns
AddCellValueCondition(ComparisonOperatorType, double, double)
Add new cell value condition to the collection.
public IConditionalFormat AddCellValueCondition(ComparisonOperatorType operatorType, double value1, double value2)
Parameters
operatorType
ComparisonOperatorTypeThe Comparison operator for conditional formatting in Excel.
value1
doubleThe first value
value2
doubleThe second value.If the operatorTypy is Equal or NotEqual or Greater or Less or GreaterOrEqual or LessOrEqual, then this parameter must use double.NaN.Don't use null
Returns
AddCellValueCondition(ComparisonOperatorType, string, string)
Add new cell value condition to the collection.
public IConditionalFormat AddCellValueCondition(ComparisonOperatorType operatorType, string value1, string value2)
Parameters
operatorType
ComparisonOperatorTypeThe Comparison operator for conditional formatting in Excel.
value1
stringThe first value
value2
stringThe second value .If the operatorTypy is Equal or NotEqual or Greater or Less or GreaterOrEqual or LessOrEqual, then this parameter must use string.Empty or null
Returns
AddCells(XlsConditionalFormats)
public void AddCells(XlsConditionalFormats formats)
Parameters
formats
XlsConditionalFormats
AddCells(IList)
public void AddCells(IList arrCells)
Parameters
arrCells
IList
AddCondition()
public IConditionalFormat AddCondition()
Returns
AddContainsBlanksCondition()
Add new contain blanks condition to the collection.
public IConditionalFormat AddContainsBlanksCondition()
Returns
AddContainsErrorsCondition()
Add new contain errors condition to the collection.
public IConditionalFormat AddContainsErrorsCondition()
Returns
AddContainsTextCondition(string)
Add new contain condition to the collection.
public IConditionalFormat AddContainsTextCondition(string text)
Parameters
text
stringcontain text
Returns
AddDuplicateValuesCondition()
Add new duplicate values condition to the collection.
public IConditionalFormat AddDuplicateValuesCondition()
Returns
AddEndsWithCondition(string)
Add new end with condition to the collection.
public IConditionalFormat AddEndsWithCondition(string text)
Parameters
text
stringend with text
Returns
AddNotContainsBlanksCondition()
Add new not contain blanks condition to the collection.
public IConditionalFormat AddNotContainsBlanksCondition()
Returns
AddNotContainsErrorsCondition()
Add new not contain errors condition to the collection.
public IConditionalFormat AddNotContainsErrorsCondition()
Returns
AddNotContainsTextCondition(string)
Add new not contain condition to the collection.
public IConditionalFormat AddNotContainsTextCondition(string text)
Parameters
text
stringnot contain text
Returns
AddRange(IXLSRange)
public void AddRange(IXLSRange range)
Parameters
range
IXLSRange
AddTimePeriodCondition(TimePeriodType)
Add new time period condition to the collection.
public IConditionalFormat AddTimePeriodCondition(TimePeriodType timePeriodType)
Parameters
timePeriodType
TimePeriodTypetype of the time period
Returns
AddTopBottomCondition(TopBottomType, int)
Add new TopN or BottomN condition to the collection.
public IConditionalFormat AddTopBottomCondition(TopBottomType topBottomType, int rank)
Parameters
topBottomType
TopBottomTyperank
intrank of the Top or Bottom
Returns
AddUniqueValuesCondition()
Add new unique values condition to the collection.
public IConditionalFormat AddUniqueValuesCondition()
Returns
BeginUpdate()
[Obsolete("the method is not implemented")]
public void BeginUpdate()
Clear()
public void Clear()
ClearCells()
public void ClearCells()
Clone(object)
public override object Clone(object parent)
Parameters
parent
object
Returns
CompareFormats(IConditionalFormat, IConditionalFormat)
[Obsolete("the method is not implemented")]
public bool CompareFormats(IConditionalFormat firstFormat, IConditionalFormat secondFormat)
Parameters
firstFormat
IConditionalFormatsecondFormat
IConditionalFormat
Returns
CompareTo(XlsConditionalFormats)
public bool CompareTo(XlsConditionalFormats formats)
Parameters
formats
XlsConditionalFormats
Returns
Contains(Rectangle[])
public bool Contains(Rectangle[] arrRanges)
Parameters
arrRanges
Rectangle[]
Returns
ContainsCount(Rectangle)
public int ContainsCount(Rectangle range)
Parameters
range
Rectangle
Returns
EndUpdate()
[Obsolete("the method is not implemented")]
public void EndUpdate()
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetByIndex(int)
public IConditionalFormat GetByIndex(int index)
Parameters
index
int
Returns
GetEnumerator()
public IEnumerator GetEnumerator()
Returns
GetHashCode()
public override int GetHashCode()
Returns
Remove(Rectangle[])
public void Remove(Rectangle[] arrRanges)
Parameters
arrRanges
Rectangle[]
Remove(int, int, int, int)
public void Remove(int startRow, int startColumn, int totalRows, int totalColumns)
Parameters
RemoveAt(int)
public void RemoveAt(int index)
Parameters
index
int