Documentation
README
Excel Data Analysis Workflow
End-to-end workflow for structured Excel analysis. Each step maps to a capability sub-skill that can be loaded for detailed patterns.
Workflow
Step 1 — Count rows across all sheets (lightweight, no full load)
Count rows per sheet without loading data into memory. Use openpyxl
read_only mode — this works for any file size.
import openpyxl, gc
wb = openpyxl.load_workbook(file_path, read_only=True, data_only=True)
total_rows = 0
sheet_info = {}
for name in wb.sheetnames:
ws = wb[name]
row_count = sum(1 for _ in ws.iter_rows(min_row=2, values_only=True))
total_rows += row_count
sheet_info[name] = row_count
print(f"Sheet '{name}': {row_count} rows")
wb.close()
print(f"总行数={total_rows}")
This is the opening of the README. Read the full README on GitHub.