from openpyxl import Workbook wb = Workbook() ws = wb.get_active_sheet() ws.title='99表' for row in range(1,10): for col in range(1,10): ws.cell(row = row, column = col).value = row * col wb.save(filename = 'xxx.xlsx')
from openpyxl import Workbook wb = Workbook() ws = wb.get_active_sheet() ws.title='99表' for row in range(1,10): for col in range(1,10): ws.cell(row = row, column = col).value = row * col wb.save(filename = 'xxx.xlsx')
转载于:https://www.cnblogs.com/ronyjay/p/6845011.html