Excel.ConditionalTopBottomCriterionType enum
Represents the criteria for the above/below average conditional format type.
Remarks
Used by
Examples
// 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();
});
Fields
| bottomItems = "BottomItems" | |
| bottomPercent = "BottomPercent" | |
| invalid = "Invalid" | |
| topItems = "TopItems" | |
| topPercent = "TopPercent" |