wps-conditional-format — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited wps-conditional-format (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
让数据自动变色、加图标、显示数据条。一看就懂。
"领导要的那种红绿灯效果,就是条件格式。"
wps-chartwps-formula需求:成绩≥90绿色,60-89正常,<60红色
openpyxl方式:from openpyxl import load_workbook
from openpyxl.formatting.rule import CellIsRule
from openpyxl.styles import PatternFill
wb = load_workbook('scores.xlsx')
ws = wb.active
red = PatternFill(start_color='FF6B6B', end_color='FF6B6B', fill_type='solid')
green = PatternFill(start_color='51CF66', end_color='51CF66', fill_type='solid')
yellow = PatternFill(start_color='FFD43B', end_color='FFD43B', fill_type='solid')
ws.conditional_formatting.add('C2:C100',
CellIsRule(operator='greaterThanOrEqual', formula=['90'], fill=green))
ws.conditional_formatting.add('C2:C100',
CellIsRule(operator='lessThan', formula=['60'], fill=red))
wb.save('scores_formatted.xlsx')JSA宏方式:function HighlightScores() {
var ws = Application.ActiveSheet;
var range = ws.Range("C2:C100");
range.FormatConditions.Delete(); // 清除旧规则
// >=90 绿色
var fc1 = range.FormatConditions.Add(1, 5, "90"); // xlCellValue, xlGreaterEqual
fc1.Interior.Color = 0x66CF51; // BGR绿色
// <60 红色
var fc2 = range.FormatConditions.Add(1, 6, "60"); // xlCellValue, xlLess
fc2.Interior.Color = 0x6B6BFF; // BGR红色
Application.alert("条件格式已设置!");
}from openpyxl.formatting.rule import DataBarRule
ws.conditional_formatting.add('D2:D50',
DataBarRule(start_type='min', end_type='max',
color='3498DB', showValue=True))// JSA: 添加数据条
function AddDataBar() {
var range = Application.ActiveSheet.Range("D2:D50");
range.FormatConditions.Delete();
range.FormatConditions.AddDatabar();
var db = range.FormatConditions.Item(1);
db.BarColor.Color = 0xDB9834; // BGR蓝色
}from openpyxl.formatting.rule import FormulaRule
ws.conditional_formatting.add('A2:A100',
FormulaRule(formula=['COUNTIF($A$2:$A$100,A2)>1'],
fill=PatternFill('solid', fgColor='FFD43B')))// JSA: 高亮重复值
function HighlightDuplicates() {
var range = Application.ActiveSheet.Range("A2:A100");
range.FormatConditions.Delete();
var fc = range.FormatConditions.AddUniqueValues();
fc.DupeUnique = 1; // xlDuplicate
fc.Interior.Color = 0x3BD4FF; // BGR黄色
}// JSA: 红绿灯图标集
function AddTrafficLights() {
var range = Application.ActiveSheet.Range("E2:E50");
range.FormatConditions.Delete();
var fc = range.FormatConditions.AddIconSetCondition();
fc.IconSet = Application.ActiveWorkbook.IconSets(1); // 红绿灯
// 自定义阈值
fc.IconCriteria(2).Value = 60;
fc.IconCriteria(3).Value = 90;
}from openpyxl.formatting.rule import FormulaRule
stripe = PatternFill('solid', fgColor='F0F4F8')
ws.conditional_formatting.add('A2:G100',
FormulaRule(formula=['MOD(ROW(),2)=0'], fill=stripe))| 需求 | 类型 | 关键参数 |
|---|---|---|
| 大于/小于变色 | CellIsRule | operator + formula |
| 包含特定文字 | FormulaRule | SEARCH函数 |
| 重复值高亮 | UniqueValues | DupeUnique=1 |
| 前N名/后N名 | Top10Rule | rank + percent |
| 数据条 | DataBarRule | color |
| 色阶(渐变色) | ColorScaleRule | start/mid/end_color |
| 图标集 | IconSetCondition | IconSet类型 |
| 日期到期提醒 | FormulaRule | TODAY()比较 |
| 隔行变色 | FormulaRule | MOD(ROW(),2) |
确认要格式化的范围和条件
# 数值变色
/wps-conditional-format 让销售额低于目标的变红色,超过的变绿色
# 数据条
/wps-conditional-format 给完成率列加个进度条效果
# 重复值
/wps-conditional-format 帮我找出A列有哪些重复的数据~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.