主题
AllowFormattingRows (属性)
如果允许对受保护的工作表上的行进行格式设置,则返回 True。bool 类型,只读。
说明
可以使用 Protect 方法参数设置 AllowFormattingRows 属性。
示例
python
#本示例允许用户对受保护的工作表上的行进行格式设置,并通知用户
def test():
Application.ActiveSheet.Unprotect()
# Allow rows to be formatted on a protected worksheet.
if Application.ActiveSheet.Protection.AllowFormattingRows == False:
Application.ActiveSheet.Protect(None, None, None, None, None, None, None, True)
print("Rows can be formatted on this protected worksheet.")
python
#本示例显示是否允许对受保护的工作表上的行进行格式设置
def test():
print(Worksheets.Item(1).Protection.AllowFormattingRows)