2021
02-20
02-20
python向xls写入数据(包括合并,边框,对齐,列宽)
1、常规写入#-*-encoding=utf-8-*-importxlwtif__name__=='__main__':head=['姓名','年龄','出生年月']data=[['盖伦','20','2012-02-04'],['赵信','18','2013-05-12'],['女枪','18','2015-12-12'],['剑圣','20','2012-11-14'],]workbook=xlwt.Workbook()#添加一个表,#cell_overwrite_ok=True表示覆盖,如果下标相同,则覆盖,不写,下标相同,则抛出异常sheet1=workb...
继续阅读 >