excel-freeze

Freeze or unfreeze panes in an Excel worksheet. Supports freezing the first row, the first column, both first row and column, and freezing to a specified position. Triggered by phrases such as "freeze", "pin header", "lock first row", "keep first column", "unfreeze", and "freeze".

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "excel-freeze" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e95478cf82c9df9ab5a11ed8c6e899d2544e987145113781a5bb09a640cc7342. Verify the upstream source and version against https://skillhub.cn/skills/user_8f803df1/excel-freeze before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Freeze or unfreeze panes in an Excel worksheet. Supports freezing the first row, the first column, both first row and column, and freezing to a specified position. Triggered by phrases such as "freeze", "pin header", "lock first row", "keep first column", "unfreeze", and "freeze".

0 Downloads

Introduction source: third_party · user_8f803df1 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: excel-freeze
description: |
  Freeze or unfreeze Excel worksheet panes. Supports freeze top row, freeze first column, freeze top row + first column, freeze at specified position.
  冻结或取消冻结 Excel 工作表窗格,支持冻结首行、冻结首列、冻结首行+首列、冻结指定位置。
  Trigger keywords: "freeze" "freeze header" "lock top row" "freeze first column" "unfreeze"
  触发词包括"冻结""固定表头""锁定首行""首列不动""取消冻结""冻住"。

This skill follows [[excel-safe-workflow]] four-step method (lightweight: Scout→Execute→Verify). 本技能遵循 [[excel-safe-workflow]] 四步法(轻量版:勘察→执行→验证)。

Excel Freeze Panes / Excel 冻结窗格

功能

冻结后,被冻结的行/列在滚动时始终可见。纯 Excel 视图效果,不影响数据。

第零步:需求解析

用户说 冻结位置 freeze_panes 值
"冻结首行""表头不动""标题行固定" 仅首行 A2
"冻结首列""第一列不动""序号锁定" 仅首列 B1
"冻结首行和首列""表头和序号都不动" 首行+首列 B2
"冻结前3行" 指定行 A4
"取消冻结""解冻""不冻了" 取消 None

第一步:勘察

from openpyxl import load_workbook

wb = load_workbook('目标文件.xlsx')
ws = wb.active
current = ws.freeze_panes
print(f'当前冻结: {current if current else "无"}')
print(f'工作表: {ws.max_row}行 x {ws.max_column}列')

# 展示表头供确认
for col_idx in range(1, min(6, ws.max_column + 1)):
    h = ws.cell(row=1, column=col_idx).value
    print(f'  表头列{col_idx}: {h}')

第二步:执行

from openpyxl import load_workbook

# ===== 用户配置 =====
FREEZE = 'A2'  # None=取消 / 'A2'=首行 / 'B1'=首列 / 'B2'=首行+首列 / 'A4'=前三行
# ====================

wb = load_workbook('目标文件.xlsx')
ws = wb.active
ws.freeze_panes = FREEZE
wb.save('目标文件.xlsx')

desc = {
    None: '已取消冻结',
    'A2': '已冻结首行',
    'B1': '已冻结首列',
    'B2': '已冻结首行+首列',
}
print(desc.get(FREEZE, f'已冻结: {FREEZE}'))

第三步:验证

wb = load_workbook('目标文件.xlsx', read_only=True)
ws = wb.active
print(f'冻结状态: {ws.freeze_panes}')
wb.close()

注意事项

  • 仅影响活动工作表:如有多个 sheet,需逐个设置
  • 合并单元格:冻结线穿过合并单元格时,合并会被拆分
  • Excel 打开才可见:openpyxl 只是写入属性,效果需在 Excel 中查看
  • 操作前必备份:遵循 [[excel-safe-workflow]] 第零步——操作前自动备份(时间戳命名)

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决 Excel 冻结窗格的高频办公需求,实用性强
  • 支持多种冻结模式(首行、首列、组合、指定位置)
Trigger Precision90/100

Highlights

  • 触发词覆盖中英文常见表达,边界清晰
Structure and Standards90/100

Highlights

  • 结构清晰,分步骤执行,有配置说明和验证环节
Execution Reliability75/100

Areas to improve

  • 异常处理与备份机制未显式实现 Reported severity: Minor

    脚本未显式处理文件不存在、权限错误等常见异常,也未体现备份机制的实际调用

    Recommendation: 在执行脚本中添加 try-except 异常处理,并在操作前自动创建带时间戳的备份文件

Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Save or modify files

    Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.

    Mentioned in main document · lines 58

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.