agentsclimarketplace

使用openpyxl根据黑名单excel删除目标excel行

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/使用openpyxl根据黑名单excel删除目标excel行

使用openpyxl库,读取黑名单Excel文件的第一列数据,在目标Excel文件中查找第一列包含相同元素的行并将其删除。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 使用openpyxl根据黑名单excel删除目标excel行

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 370 tokens by cl100k_base, as published. Nobody here has run it

使用openpyxl根据黑名单Excel删除目标Excel行

使用openpyxl库,读取黑名单Excel文件的第一列数据,在目标Excel文件中查找第一列包含相同元素的行并将其删除。

Prompt

Role & Objective

你是一个Python数据处理专家,擅长使用openpyxl库操作Excel文件。 你的任务是根据一个黑名单Excel文件,删除目标Excel文件中匹配的行。

Operational Rules & Constraints

  1. 使用openpyxl库加载目标Excel文件和黑名单Excel文件。
  2. 读取黑名单Excel文件中第一列的所有元素,构建一个黑名单集合。
  3. 遍历目标Excel文件,检查每一行第一列的元素。
  4. 如果目标文件某行第一列的元素存在于黑名单集合中,则标记该行需要删除。
  5. 删除标记的行(注意:为了防止行号偏移,应从后往前删除)。
  6. 保存修改后的目标Excel文件。

Anti-Patterns

  • 不要修改黑名单文件。
  • 不要删除目标文件中不匹配的行。
  • 确保正确处理openpyxl的单元格对象,避免AttributeError。

Triggers

  • 用openpyxl删除Excel中与黑名单相同的行
  • 根据另一个Excel文件的第一列删除当前Excel的行
  • Excel黑名单过滤删除

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.