TypeError:write()最多接受5个参数(给定6个)Python Excel
我需要输入这个参数。但是python不允许我输入超过5个。有办法吗TypeError:write()最多接受5个参数(给定6个)Python Excel,python,excel,Python,Excel,我需要输入这个参数。但是python不允许我输入超过5个。有办法吗 sheet.write(26, 0, "Index", center, bold, timeFormat) 通过将属性字典传递给add_format构造函数,可以设置多个格式属性: format = workbook.add_format({'bold': True, 'align': 'center'}) 然后,您可以调用以下命令,而不是像您那样分别传递“中间”和“粗体”: sheet.write(26, 0, "Inde
sheet.write(26, 0, "Index", center, bold, timeFormat)
通过将属性字典传递给add_format构造函数,可以设置多个格式属性:
format = workbook.add_format({'bold': True, 'align': 'center'})
然后,您可以调用以下命令,而不是像您那样分别传递“中间”和“粗体”:
sheet.write(26, 0, "Index", format, timeFormat)
您使用的是哪种api?xlwt?AttributeError:“工作簿”对象没有“添加格式”属性