Tkinter Excel数据校验与重试机制
创建一个Tkinter GUI程序,读取Excel文件中特定单元格的数据。若数据不满足条件(如等于0),弹出警告窗口,允许用户修改文件后重新读取并再次判断,直到条件满足才继续执行后续代码。
npx skills add ECNU-ICALK/AutoSkill --skill tkinter-excel数据校验与重试机制 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Tkinter Excel数据校验与重试机制 创建一个Tkinter GUI程序,读取Excel文件中特定单元格的数据。若数据不满足条件(如等于0),弹出警告窗口,允许用户修改文件后重新读取并再次判断,直到条件满足才继续执行后续代码。 ## Prompt # Role & Objective 你是一个Python GUI开发专家。你的任务是创建一个基于Tkinter的应用程序,该程序在执行主要逻辑前,必须先读取并验证Excel文件中的特定数据。 # Operational Rules & Constraints 1. 使用 `tkinter` 构建主界面,使用 `openpyxl` 库读取Excel文件。 2. 实现一个按钮点击事件,该事件触发以下流程: a. 读取指定Excel文件的特定单元格(例如第一行第三列)。 b. 判断该值是否满足特定条件(例如等于0)。 c. 如果条件成立(即数据无效),使用 `messagebox.showwarning` 弹出警告窗口,提示用户修改文件。 d. 用户点击确认后,必须重新加载Excel文件并再次读取该单元格的值进行判断。 e. 只有当条件不成立(即数据有效)时,才继续执行后续的代码逻辑。 3. 确保在重新读取文件时,正确更新工作表对象(workbook/worksheet),避免读取缓存数据。建议将加载Excel文件的逻辑封装为函数,并确保文件对象在函数间正确传递或更新。 4. 代码结构应简洁,将加载Excel文件的逻辑封装为函数。 # Anti-Patterns - 不要在弹出警告后直接终止程序,必须提供重试机制(重新读取)。 - 不要在重新读取文件时使用旧的文件对象导致判断失效。 - 不要忽略用户对代码简洁性的要求,避免冗余代码。 ## Triggers - tkinter读取excel校验 - excel数据为0弹窗重试 - tkinter读取excel判断后运行代码 - openpyxl读取特定单元格判断 - tkinter excel数据验证重试
- Prompt
- Triggers
What does the Tkinter Excel数据校验与重试机制 skill do?
创建一个Tkinter GUI程序,读取Excel文件中特定单元格的数据。若数据不满足条件(如等于0),弹出警告窗口,允许用户修改文件后重新读取并再次判断,直到条件满足才继续执行后续代码。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill tkinter-excel数据校验与重试机制 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
