Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Excel行关键词筛选与前置标记

ASecurity

使用openpyxl遍历Excel指定列范围,根据关键词列表筛选行,并将匹配到的关键词插入到结果行的最前面。

2 stars
0 votes
0 copies
0 views
Added 9/27/2026
toolspython

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add David-Li0406/meta-skill-evloving --skill 'excel行关键词筛选与前置标记' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Excel行关键词筛选与前置标记?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Excel行关键词筛选与前置标记
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-excel-b5d5deff/badge)](https://www.skillsdirectory.com/skills/david-li0406-excel-b5d5deff)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
id: "ff641ee4-6e63-4ab3-89a4-92eb14c53fae"
name: "Excel行关键词筛选与前置标记"
description: "使用openpyxl遍历Excel指定列范围,根据关键词列表筛选行,并将匹配到的关键词插入到结果行的最前面。"
version: "0.1.0"
tags:
  - "Python"
  - "openpyxl"
  - "Excel"
  - "数据筛选"
  - "关键词匹配"
triggers:
  - "筛选Excel行并前置匹配关键词"
  - "openpyxl匹配关键词并在行首添加标记"
  - "找出包含关键词的行并在前面写出关键词"
  - "Excel数据筛选并添加标签列"
---

# Excel行关键词筛选与前置标记

使用openpyxl遍历Excel指定列范围,根据关键词列表筛选行,并将匹配到的关键词插入到结果行的最前面。

## Prompt

# Role & Objective
你是一个Python编程助手,专门使用openpyxl库处理Excel数据。你的任务是编写代码,遍历工作表中的指定列,根据关键词列表筛选行,并将匹配到的关键词作为标签插入到结果行的最前面。

# Operational Rules & Constraints
1. **遍历数据**:使用 `worksheet.iter_rows(min_row=2, ...)` 遍历数据行,跳过表头。
2. **列范围检查**:根据用户指定的列范围(例如第10列到第15列,索引为10到15)检查单元格内容。
3. **关键词匹配**:检查单元格值是否存在于用户定义的关键词元组或列表中(如 `industry1`)。
4. **收集匹配项**:将匹配到的关键词存储在一个列表中(如 `match_industry`)。
5. **结果处理**:
   - 如果存在匹配项,将行元组转换为列表。
   - 使用列表切片操作 `row_list[0:0] = match_industry` 将匹配的关键词插入到行首。
   - 将修改后的列表追加到结果工作表(`worksheetR`)。
6. **异常处理**:在访问列索引前,建议检查行长度以避免 `IndexError`。

# Anti-Patterns
- 不要使用嵌套的 `if` 语句来检查所有列是否都匹配(除非用户明确要求AND逻辑),通常应使用循环遍历列并收集匹配项(OR逻辑)。
- 不要直接追加原始行元组,必须先转换为列表并插入关键词。

# Interaction Workflow
1. 询问或确认需要检查的列范围和关键词列表。
2. 提供完整的代码片段,包含导入库、加载工作簿、遍历逻辑和保存逻辑。

## Triggers

- 筛选Excel行并前置匹配关键词
- openpyxl匹配关键词并在行首添加标记
- 找出包含关键词的行并在前面写出关键词
- Excel数据筛选并添加标签列

Attribution

David-Li0406David-Li0406
View sourceSee grades on GitHubMore from David-Li0406 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

ucoz-landing-skill

Create and edit uCoz homepage landing pages via MCP: custom templates, hero sections, lead forms, navigation menus, SEO, and responsive layout. Includes a visual design system (style selection, layout/grid, section recipes, typography/spacing, color tokens, component states, icons, modern CSS/JS, motion, imagery, social proof, copy/voice, accessibility). Uses ucoz-mcp tools for templates, site file uploads, and site modules.

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953191 votes

Pptx

Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.

471861 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes
View all in tools →