Excel.ConditionalTopBottomCriterionType enum
表示高于/低于平均水平条件格式类型的条件。
注解
使用方
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/14-conditional-formatting/conditional-formatting-basic.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Sample");
const range = sheet.getRange("B21:E23");
const conditionalFormat = range.conditionalFormats
.add(Excel.ConditionalFormatType.topBottom);
conditionalFormat.topBottom.format.fill.color = "green"
conditionalFormat.topBottom.rule = {
rank: 1,
type: Excel.ConditionalTopBottomCriterionType.topItems
};
await context.sync();
});
字段
| bottomItems = "BottomItems" | |
| bottomPercent = "BottomPercent" | |
| invalid = "Invalid" | |
| topItems = "TopItems" | |
| topPercent = "TopPercent" |