/formatted-export
从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill formatted-export --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/formatted-export
Context preview
The summary Claude sees to decide when to auto-load this skill.
从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。
SKILL.md
formatted-export.SKILL.mdname: formatted-export-with-parquet
description: "从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。"
metadata: "{\"nanobot\": {\"requires\": {\"pip\": [\"pandas\", \"pyarrow\", \"openpyxl\"]}}}"Formatted_Export
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Skill Steps
Step1 对所有 sheet 进行扫描,通过模糊匹配定位目标列,筛选出符合条件(如空值或无效字符)的记录。
empty_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 文件,整行标红显示以便于视觉识别,并生成下载链接。
from 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("未找到符合条件的记录,无需导出。")Read more
name: formatted-export-with-parquet
description: "从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。"
metadata: "{\"nanobot\": {\"requires\": {\"pip\": [\"pandas\", \"pyarrow\", \"openpyxl\"]}}}"Formatted_Export
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Skill Steps
Step1 对所有 sheet 进行扫描,通过模糊匹配定位目标列,筛选出符合条件(如空值或无效字符)的记录。
empty_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 文件,整行标红显示以便于视觉识别,并生成下载链接。
from 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("未找到符合条件的记录,无需导出。")The SenseNova model family plugs directly into agent runtimes such as OpenClaw and hermes-agent, with the skills in this repository extending the models with concrete, end-to-end office capabilities.
Repo: OpenSenseNova/SenseNova-Skills
Other skills on sensenova-skills.
- /sn-da-excel-workflow
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
Open skill - /category-coloring
当Excel文件总行数超过1万行时,通过转换为Parquet格式提升读取性能,提取目标指标并计算最大值,最后将结果输出为Excel并对特定行进行高亮标注。
Open skill - /duplicate-value-coloring
对比Excel多表中的特定系数并对异常值进行颜色标记。
Open skill - /outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
Open skill - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill

