ExcelScript.ConditionalFormatRuleType enum
Представляет типы значений условного формата.
Комментарии
Примеры
/**
* This script creates data bar conditional formatting on the selected range.
* The scale of the data bar goes from 0 to 1000.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the selected range.
const selected = workbook.getSelectedRange();
// Create new conditional formatting on the range.
const format = selected.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar);
const dataBarFormat = format.getDataBar();
// Set the lower bound of the data bar formatting to be 0.
const lowerBound: ExcelScript.ConditionalDataBarRule = {
type: ExcelScript.ConditionalFormatRuleType.number,
formula: "0"
};
dataBarFormat.setLowerBoundRule(lowerBound);
// Set the upper bound of the data bar formatting to be 1000.
const upperBound: ExcelScript.ConditionalDataBarRule = {
type: ExcelScript.ConditionalFormatRuleType.number,
formula: "1000"
};
dataBarFormat.setUpperBoundRule(upperBound);
}
Поля
automatic | |
formula | |
highestValue | |
invalid | |
lowestValue | |
number | |
percent | |
percentile |
Совместная работа с нами на GitHub
Источник этого содержимого можно найти на GitHub, где также можно создавать и просматривать проблемы и запросы на вытягивание. Дополнительные сведения см. в нашем руководстве для участников.
Office Scripts