fs-lawrisk/tools/inspect_excel.py

15 lines
438 B
Python
Raw Normal View History

import openpyxl
def inspect():
path = r"c:\Users\WIN10\Desktop\work\11th-week\法律风险提示-new\市监局-lawRisk-backend\test_import_data.xlsx"
wb = openpyxl.load_workbook(path, data_only=True)
ws = wb.active
print("--- Row Inspection ---")
for i, row in enumerate(ws.iter_rows(min_row=1, max_row=12, values_only=True), start=1):
print(f"Row {i}: {row}")
if __name__ == "__main__":
inspect()