ExcelScript.IconSet enum
注釈
例
/**
* 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.
conditionalFormatting.getIconSet().setCriteria([
{
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
}]);
}
フィールド
fiveArrows | |
fiveArrowsGray | |
fiveBoxes | |
fiveQuarters | |
fiveRating | |
fourArrows | |
fourArrowsGray | |
fourRating | |
fourRedToBlack | |
fourTrafficLights | |
invalid | |
threeArrows | |
threeArrowsGray | |
threeFlags | |
threeSigns | |
threeStars | |
threeSymbols | |
threeSymbols2 | |
threeTrafficLights1 | |
threeTrafficLights2 | |
threeTriangles |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Scripts