from openpyxl import load_workbook wb=load_workbook('anju.xlsx') sheet=wb.active for uu in range(1,100): sheet.cell(row=uu,column=6).value=zuijin(av1,av2) wb.save("1.xlsx")