ai_member_xiaoban/makee_vala/check_sheets.py
2026-03-18 08:00:08 +08:00

15 lines
561 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import pandas as pd
from openpyxl import load_workbook
# 最新的定稿库文件路径
final_lib_file = "/root/.openclaw/media/inbound/â_¼ï_LV1-å_ç_å_è_åº_-ç¼_å_é_è_ç_è_é---1de9de11-1a6b-45c7-856a-4d69f9b26aa9.xlsx"
# 查看所有sheet
wb = load_workbook(final_lib_file, read_only=True)
print(f"文件包含的sheet{wb.sheetnames}")
for sheet_name in wb.sheetnames:
df = pd.read_excel(final_lib_file, sheet_name=sheet_name)
print(f"\nsheet名称{sheet_name},行数:{len(df)}")
print(f"前3行预览\n{df.head(3)}")