python - 锁定或解锁条件格式单元格 xlsxwriter

标签 python locking xlsxwriter unlock

我已经保护了整个工作表,然后我正在解锁条件格式单元格,但它对我不起作用。

请帮助任何人。

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/

相关文章:

c# - yield 在 lock 语句中返回

JavaNIO : check File lock created by a root-user from a process running under a normal user?

Python 如何使用 ExcelWriter 写入现有工作表

python - Xlsxwriter - 使用表中的变量来表现出色

python - 从 Python 3.x 中的 elasticsearch 索引中删除所有文档

Python:如何在 jinja2 中正确循环此编辑

python - postgres 数据库 View 上的 Flask Admin

python - 用正则表达式模式替换

c++ - 实时线程中的 ZeroMQ inproc PubSub send() 调用会导致严重阻塞吗?

python - xlsxwriter:在其中添加带有其他工作表的公式