返回 the value that indicates whether the Worksheet is protected. Read-only Boolean
语法
property IsProtected: boolean;
示例
此示例在更新范围前检查工作表是否受保护。工作表保护独立于工作簿保护
var
Sheet: TXLSWorksheet;
begin
Sheet := Workbook.Sheets[1];
if Sheet.IsProtected then
Sheet.UnProtect;
Sheet.Range['A1', 'A1'].Value := 'Updated';
end;