ExcelScript.ConditionalIconCriterionOperator enum
Stellt den Operator für jedes Symbolkriterium dar.
Hinweise
Beispiele
/**
* This script applies icon set conditional formatting to a range.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the range "A1:A5" on the current worksheet.
const sheet = workbook.getActiveWorksheet();
const range = sheet.getRange("A1:A5");
// Create icon set conditional formatting on the range.
const conditionalFormatting = range.addConditionalFormat(ExcelScript.ConditionalFormatType.iconSet);
// Use the "3 Traffic Lights (Unrimmed)" set.
conditionalFormatting.getIconSet().setStyle(ExcelScript.IconSet.threeTrafficLights1);
// Set the criteria to use a different icon for the bottom, middle, and top thirds of the values in the range.
const criteria: ExcelScript.ConditionalIconCriterion[] = [
{
formula: '=0', operator: ExcelScript.ConditionalIconCriterionOperator.greaterThanOrEqual,
type: ExcelScript.ConditionalFormatIconRuleType.percent
},
{
formula: '=33', operator: ExcelScript.ConditionalIconCriterionOperator.greaterThanOrEqual,
type: ExcelScript.ConditionalFormatIconRuleType.percent
},
{
formula: '=67', operator: ExcelScript.ConditionalIconCriterionOperator.greaterThanOrEqual,
type: ExcelScript.ConditionalFormatIconRuleType.percent
}];
conditionalFormatting.getIconSet().setCriteria(criteria);
}
Felder
greaterThan | |
greaterThanOrEqual | |
invalid |
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Office Scripts