large-file-conditional-formatting
Installation
SKILL.md
Skill Steps
Note: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.
Step1 读取文件并统计所有 sheet 的行数,汇总后打印总行数,用于判断是否需要大文件加速。
import pandas as pd
import openpyxl
file_path = "input_data.xlsx"
# 获取所有sheet名称
wb = openpyxl.load_workbook(file_path, read_only=True)
sheet_names = wb.sheetnames
print("Sheet列表:", sheet_names)
print("Sheet数量:", len(sheet_names))