标签:xlsx column xls import put span tor dir sheet
#! python3 # multiplicationTable.py import openpyxl,os from openpyxl.styles import Font, NamedStyle os.chdir(‘C:\\Users\\Administrator\\Python35-32‘) num=int(input()) wb = openpyxl.Workbook() sheet = wb.get_active_sheet() for n in range(1,num+1): for m in range(1,num+1): sheet.cell(row=1, column=m+1).font=Font(bold=True) sheet.cell(row=1, column=m+1).value=m sheet.cell(row=m+1, column=1).font=Font(bold=True) sheet.cell(row=m+1, column=1).value=m sheet.cell(row=n+1, column=m+1).value = n*m wb.save(‘multiplicationTable.xlsx‘)
python编程快速上手之第10章实践项目参考答案(12.13.1)
标签:xlsx column xls import put span tor dir sheet
原文地址:http://www.cnblogs.com/flying-wyf/p/6843486.html