条件格式给出属性:' noneType'对象没有属性'组'
我正在尝试使用XLSWRITER在Excel中的一列中运行条件格式。我想以某种格式将列中的空白行。在下面,我附上了代码段。但这给了我一个属性:“ nontype”对象没有属性“ group”。
format1 = workbook.add_format({'bg_color': '#FFC7CE',
'font_color': '#9C0006'})
worksheet.conditional_format('G:H', {'type': 'no_blanks','format':format1})
谁能帮我吗?
I am trying to run a conditional format for one of my column in excel using xlswriter. I want to have the blank rows in the column in a certain format. Below I have attached the code snippet. But it is giving me an AttributeError:'NoneType' object has no attribute 'group'.
format1 = workbook.add_format({'bg_color': '#FFC7CE',
'font_color': '#9C0006'})
worksheet.conditional_format('G:H', {'type': 'no_blanks','format':format1})
Can anyone help me on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这种情况下,不支持“ g:h”列。您需要指定完整范围,例如:
或使用行柱符号:
The column notation 'G:H' isn't supported in this case. You will need to specify the full range like:
Or with row-column notation: