我已经保护了整个工作表,然后我正在解锁条件格式单元格,但它对我不起作用。
请帮助任何人。
format1 = wb.add_format({'bg_color':#87c2ff ,'locked': False})
ws.conditional_format(colrang, {'type': 'cell',
'criteria': 'not equal to',
'value': rowIndx,
'format': format1,
})
但单元格未解锁。
最佳答案
I have protected the complete sheet, then I am unlocking the conditional formatting cell, but its not working for me.
Excel 中的条件格式不支持此功能。来自 XlsxWriter docs :
Note
In Excel, a conditional format is superimposed over the existing cell format and not all cell format properties can be modified. Properties that cannot be modified in a conditional format are font name, font size, superscript and subscript, diagonal borders, all alignment properties and all protection properties.
关于python - 锁定或解锁条件格式单元格 xlsxwriter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54422832/