[]
IColorScaleCriterion objects that define all criteria for a color scale conditional format. Each criterion specifies a threshold used by the color scale, such as the minimum, midpoint, or maximum value.
worksheet.getRange("A1:A5").setValue(new Object[][] {{10}, {20}, {30}, {40}, {50}});
IColorScale colorScale = worksheet.getRange("A1:A5").getFormatConditions()
.addColorScale(ColorScaleType.ThreeColorScale);
IColorScaleCriteria criteria = colorScale.getColorScaleCriteria();
IColorScaleCriterion criterion = criteria.get(1);
get(int index) IColorScaleCriterion object from the ColorScaleCriteria collection.intgetCount()The returned value corresponds to the number of IColorScaleCriterion objects in this collection.
worksheet.getRange("A1:A5").setValue(new Object[][] {
{10}, {20}, {30}, {40}, {50}
});
IColorScale colorScale = worksheet.getRange("A1:A5").getFormatConditions()
.addColorScale(ColorScaleType.ThreeColorScale);
int count = colorScale.getColorScaleCriteria().getCount();
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.
worksheet.getRange("A1:A5").setValue(new Object[][] {{1}, {2}, {3}, {4}, {5}});
IColorScale colorScale = worksheet.getRange("A1:A5").getFormatConditions()
.addColorScale(ColorScaleType.TwoColorScale);
IColorScaleCriterion criterion = colorScale.getColorScaleCriteria().get(0);
criterion.setType(ConditionValueTypes.Number);
index - The index of the criterion to return.IColorScaleCriterion object.