[]
Returns a single IColorScaleCriterion object from the ColorScaleCriteria collection.
Each criterion represents one threshold in a color scale conditional format, such as the minimum, midpoint, or maximum value.
IColorScaleCriterion this[int Index] { get; }
ReadOnly Default Property Item(Index As Integer) As IColorScaleCriterion
| Type | Name | Description |
|---|---|---|
| int | Index | The index of the criterion to return. |
worksheet.Range["A1:A5"].Value = new object[,] {{1}, {2}, {3}, {4}, {5}};
IColorScale colorScale = worksheet.Range["A1:A5"].FormatConditions
.AddColorScale(ColorScaleType.TwoColorScale);
IColorScaleCriterion criterion = colorScale.ColorScaleCriteria[0];
criterion.Type = ConditionValueTypes.Number;