본문으로 건너뛰기
cccskills
무료GitHub에 공개

formatted-export-with-parquet

Scan multiple Excel sheets for rows with missing or invalid entries in a target column. Combine matching records with their source sheet names, then export an Excel file with every extracted data row filled red for review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。

연동 도구Excel

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Find missing entries across multiple Excel sheets
  • Create a review list with source sheet names
  • Export matching rows with red highlighting

포함된 파일(1)

  • SKILL.md2.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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("未找到符合条件的记录,无需导出。")

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Compare counts and shares for two categories in Excel data. The skill cleans the selected columns, calculates differences and percentages, and produces a summary spreadsheet plus bar and pie charts.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing counts for two categories
  • Visualizing category shares
  • Cleaning merged-cell data before counting
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

Analyze Excel data using custom categories, count distributions, and compare groups with charts. Score text using its length, technical terms, numbers, and selected complex concepts, then visualize difficulty levels and the relationship between text length and scores.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Summarize Excel records using custom categories
  • Compare category distributions across groups
  • Score and grade text using adjustable rules
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

Count categories in a chosen data column after removing missing values and placeholder labels. Calculate each category’s share and create high-resolution charts combining counts, percentages, pie charts, and horizontal bars for distribution reports.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare record counts across categories
  • Show category shares with pie and bar charts
  • Exclude placeholder labels before counting
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

Clean category and numeric fields in structured data, compare groups with counts and cross-tabulations, and produce charts, Excel results, and a Markdown report. Export visuals as high-resolution PNG and SVG files for use in reports.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare category distributions across groups
  • Clean category labels and fill merged-cell gaps
  • Export analysis results to Excel
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

Filter Excel data using candidate column names, RGB color values, text prefixes, and regular expressions, which match text patterns. Calculate totals and averages, then export results to Excel with highlighted rows and a download link.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Filtering rows by RGB values or identifier prefixes
  • Converting text to numbers and calculating totals or averages
  • Extracting matching commands with their identifiers and descriptions
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

Filter rows from Excel or previously converted Parquet files, a format designed for efficient data storage. Summarize matching records by group with counts, percentages, and totals, then export the summary to Excel.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Count records containing a specified risk level by work category
  • Calculate group shares among matching records
  • Summarize large datasets already converted to Parquet
OpenSenseNova/SenseNova-Skills5.9천2026년 10월 9일 업데이트

OpenSenseNova의 스킬 모두 보기

이 스킬의 문제 신고