Install any skill in seconds. Free to start, no credit card required.
Get Started Free →从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。
.claude/skills/opensensenova-formatted-export-with-parquet/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 20% | 0% |
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 对所有 sheet 进行扫描,通过模糊匹配定位目标列,筛选出符合条件(如空值或无效字符)的记录。
pythonempty_target_rows = [] for sheet_name, sheet_df in all_sheets.items(): target_col = None # 优先匹配目标列名(示例:包含特定关键字的列) for col in sheet_df.columns: if 'keyword1' in str(col).lower() or 'keyword2' in str(col).lower(): target_col = col break if target_col is None: # 尝试次级推断逻辑 for col in sheet_df.columns: if 'keyword3' in str(col) and ('keyword4' in str(col)): target_col = col break if target_col is None: continue # 数据清洗:筛选空值和无效字符(如空格、'nan')行 mask = sheet_df[target_col].isna() | (sheet_df[target_col].astype(str).str.strip() == '') | (sheet_df[target_col].astype(str).str.strip() == 'nan') empty_rows = sheet_df[mask].copy() if len(empty_rows) > 0: empty_rows.insert(0, '来源Sheet', sheet_name) empty_target_rows.append(empty_rows) # 合并结果 result_df = pd.concat(empty_target_rows, ignore_index=True) if empty_target_rows else pd.DataFrame()
Step2 将筛选出的记录导出为 Excel 文件,整行标红显示以便于视觉识别,并生成下载链接。
pythonfrom openpyxl import load_workbook from openpyxl.styles import PatternFill output_path = "filtered_results_highlighted.xlsx" if not result_df.empty: # 导出基础数据 result_df.to_excel(output_path, index=False) # 加载工作簿进行格式化 wb = load_workbook(output_path) ws = wb.active # 定义红色填充样式 red_fill = PatternFill(start_color="FF0000", end_color="FF0000", fill_type="solid") # 遍历所有数据行并标红(跳过表头) for row in range(2, ws.max_row + 1): for col in range(1, ws.max_column + 1): ws.cell(row=row, column=col).fill = red_fill wb.save(output_path) print(f"结果文件已保存: {output_path}") print(f"下载链接: [点击下载标红结果文件]({output_path})") else: print("未找到符合条件的记录,无需导出。")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 11,247 | 8,007 | -29% | 1 | 1 | 0% | 1,491 | 2,399 | +61% | 0 | 0 | — |
case-02 | fail→fail | 8,604 | 7,204 | -16% | 1 | 1 | 0% | 1,809 | 2,217 | +23% | 0 | 0 | — |
case-03 | fail→fail | 8,464 | 10,282 | +21% | 1 | 1 | 0% | 1,369 | 2,271 | +66% | 0 | 0 | — |
case-04 | pass→pass | 13,592 | 14,427 | +6% | 1 | 1 | 0% | 2,556 | 3,058 | +20% | 0 | 0 | — |
case-05 | fail→pass | 10,188 | 6,522 | -36% | 1 | 1 | 0% | 1,751 | 1,973 | +13% | 0 | 0 | — |
case-06 | pass→pass | 12,353 | 8,133 | -34% | 1 | 1 | 0% | 2,715 | 2,461 | -9% | 0 | 0 | — |
case-07 | fail→fail | 7,097 | 3,664 | -48% | 1 | 1 | 0% | 1,261 | 1,293 | +3% | 0 | 0 | — |
case-08 | pass→pass | 10,162 | 3,012 | -70% | 1 | 1 | 0% | 1,763 | 1,242 | -30% | 0 | 0 | — |
case-09 | fail→pass | 8,086 | 1,489 | -82% | 1 | 1 | 0% | 1,019 | 980 | -4% | 0 | 0 | — |
case-10 | pass→pass | 8,337 | 7,106 | -15% | 1 | 1 | 0% | 1,586 | 1,999 | +26% | 0 | 0 | — |
case-11 | pass→pass | 10,213 | 4,529 | -56% | 1 | 1 | 0% | 1,477 | 1,632 | +10% | 0 | 0 | — |
case-12 | pass→pass | 14,096 | 9,273 | -34% | 1 | 1 | 0% | 1,825 | 2,044 | +12% | 0 | 0 | — |
case-13 | pass→pass | 8,717 | 3,249 | -63% | 1 | 1 | 0% | 1,145 | 1,313 | +15% | 0 | 0 | — |
case-14 | fail→fail | 3,989 | 2,146 | -46% | 1 | 1 | 0% | 479 | 992 | +107% | 0 | 0 | — |
case-15 | fail→pass | 9,118 | 2,959 | -68% | 1 | 1 | 0% | 1,677 | 1,196 | -29% | 0 | 0 | — |
case-16 | pass→pass | 12,047 | 8,085 | -33% | 1 | 1 | 0% | 2,097 | 1,697 | -19% | 0 | 0 | — |
case-17 | fail→pass | 12,587 | 5,717 | -55% | 1 | 1 | 0% | 1,581 | 1,664 | +5% | 0 | 0 | — |
case-18 | pass→pass | 3,689 | 2,159 | -41% | 1 | 1 | 0% | 628 | 1,042 | +66% | 0 | 0 | — |
case-19 | pass→pass | 8,502 | 4,103 | -52% | 1 | 1 | 0% | 1,608 | 1,544 | -4% | 0 | 0 | — |
case-20 | pass→pass | 11,863 | 6,134 | -48% | 1 | 1 | 0% | 2,262 | 1,827 | -19% | 0 | 0 | — |
case-21 | pass→pass | 3,551 | 3,403 | -4% | 1 | 1 | 0% | 717 | 1,313 | +83% | 0 | 0 | — |
case-22 | pass→pass | 9,904 | 3,623 | -63% | 1 | 1 | 0% | 1,856 | 1,304 | -30% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.