其他分享
首页 > 其他分享> > AttributeError: 'int' object has no attribute 'upper'

AttributeError: 'int' object has no attribute 'upper'

作者:互联网

因为安装的openpyxl版本是2.3.4,而代码是:

sheet.cell(rownumber, 1).value = data['id']
参数不对,应该是:
sheet.cell(None, rownumber, 1).value = data['id']

对于openpyxl2.6.2版本,写法应是:
sheet.cell(rownumber, 1).value = data['id']

标签:upper,sheet,no,int,rownumber,cell,value,data,id
来源: https://www.cnblogs.com/wisir/p/11559778.html