语言

Protection 接口

定义

代表工作表可使用的各种保护选项类型。

public interface class Protection
[System.Runtime.InteropServices.Guid("00024467-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Protection
Public Interface Protection
属性

注解

使用对象的Worksheet属性返回 ProtectionProtection 对象。

返回 保护 对象后,您可以使用以下属性设置或返回保护选项:

属性

名称 说明
AllowDeletingColumns

如果允许删除受保护工作表上的列,则返回 True。

AllowDeletingRows

如果允许删除受保护工作表上的行,则返回 True。

AllowEditRanges

返回对象 AllowEditRanges 。

AllowFiltering

如果允许用户使用工作表受保护之前设置的“自动筛选”,则返回 True。

AllowFormattingCells

如果允许对受保护的工作表上的单元格进行格式设置,则返回 True。

AllowFormattingColumns

如果允许对受保护的工作表上的列进行格式设置,则返回 True。

AllowFormattingRows

如果允许对受保护的工作表上的行进行格式设置,则返回 True。

AllowInsertingColumns

如果允许在受保护的工作表上插入列,则返回 True。

AllowInsertingHyperlinks

如果允许在受保护的工作表上插入超链接,则返回 True。

AllowInsertingRows

如果允许用户在受保护的工作表上插入行,则返回 True。

AllowSorting

如果允许在受保护的工作表上使用排序选项,则返回 True。

AllowUsingPivotTables

如果允许用户在受保护的工作表上处理数据透视表,则返回 True。

适用于