叶小强
家旺
慕粉2068358
xlrd 读取不支持此文件格式,你可以将文件后缀更改: t.xlsx ——》 t.xls
进行测试一下
墨烟溪
在创建工作表的时候,添加cell_overwrite_ok=True
例如:
ws = wb.add_sheet("CNY",cell_overwrite_ok=True)
墨烟溪
墨烟溪
在ws.write(i+2,j,val,ztstyle) 这行这里再添加一个if判断 ,只有第一行才应用 ztstyle,后面不应用,这样第一行就是绿色 后面几行就没了
qq_慕村3074328
拼写错误,修改为
titlestyle.font=titlefont
hiro636604
错误提示XFstyle没有 num_format_str 这个属性,你把完整代码贴下,我看下
洛杉矶鸡腿学徒
https://xlwt.readthedocs.io/en/latest/ 可以在这里看,或者查看源码看