import openpyxl workbook = openpyxl.load_workbook('example.xlsx') worksheets = workbook.sheetnames # 遍历每个工作表并读取数据 for sheet_name in worksheets: worksheet = workbook[sheet_name] for row in worksheet.iter_rows(min_row=1, max_row=worksheet.max_row, min_col=1, max_col=worksheet.max_column): for cell in row: data = cell.value print(data)