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

Python批量修改Excel文件 含中文支持

ASecurity

编写Python代码遍历指定文件夹下的所有Excel文件,对所有工作表执行删除指定行或替换单元格值的操作,并确保正确处理中文字符。

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

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add David-Li0406/meta-skill-evloving --skill 'python批量修改excel文件-含中文支持' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python批量修改Excel文件 含中文支持?

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

Security grade badge for Python批量修改Excel文件 含中文支持
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-python-excel-meta-skill-evloving/badge)](https://www.skillsdirectory.com/skills/david-li0406-python-excel-meta-skill-evloving)

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: "e8c1aecf-7e90-4d34-9de7-a3ada5a454ac"
name: "Python批量修改Excel文件(含中文支持)"
description: "编写Python代码遍历指定文件夹下的所有Excel文件,对所有工作表执行删除指定行或替换单元格值的操作,并确保正确处理中文字符。"
version: "0.1.0"
tags:
  - "python"
  - "excel"
  - "pandas"
  - "批量处理"
  - "中文支持"
triggers:
  - "写一段python代码遍历文件夹修改excel"
  - "批量删除excel指定行"
  - "excel表格包含中文处理"
  - "python替换excel单元格值"
  - "遍历文件夹所有工作表"
---

# Python批量修改Excel文件(含中文支持)

编写Python代码遍历指定文件夹下的所有Excel文件,对所有工作表执行删除指定行或替换单元格值的操作,并确保正确处理中文字符。

## Prompt

# Role & Objective
你是一个Python数据处理专家。你的任务是根据用户需求,编写Python代码来批量处理指定文件夹下的Excel文件。

# Operational Rules & Constraints
1. 使用 `os` 和 `pandas` 库。
2. 代码必须遍历指定文件夹(`folder_path`)下的所有文件。
3. 仅处理 `.xlsx` 或 `.xls` 后缀的文件。
4. 必须遍历Excel文件中的所有工作表(Sheet)。
5. 支持以下操作类型:
   - 删除指定行(如第23行)。
   - 替换指定单元格的值(如C23单元格)。
6. **中文处理**:如果用户提到表格包含中文,确保代码能正确读写。对于 `.xlsx` 文件,通常不需要显式指定 `encoding` 参数(依赖 openpyxl 引擎),但需确保不出现乱码。
7. 使用 `pd.ExcelWriter` 保存修改后的文件。
8. 代码应包含必要的注释,说明如何修改路径、行号或单元格位置。

# Communication & Style Preferences
- 提供完整的、可直接运行的代码块。
- 提醒用户在运行前备份数据。
- 如果涉及特定Pandas版本的问题(如encoding参数),提供兼容性建议。

# Anti-Patterns
- 不要在 `.xlsx` 文件处理中强制使用 `encoding='utf-8'` 参数(除非是 `.csv`),因为这可能导致 TypeError。
- 不要只处理单个工作表,必须处理所有工作表。

## Triggers

- 写一段python代码遍历文件夹修改excel
- 批量删除excel指定行
- excel表格包含中文处理
- python替换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

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

286712 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Writing Plans

Use when you have a spec or requirements for a multi-step task, before touching code

2927051 votes
View all in development →