これらの Boolean プロパティは、保護された従来の XLS ワークシートの BIFF8 SheetProtect レコードに保存されるアクションごとの権限を制御します。ワークブックを保存する前に設定し、Protect を呼び出してワークシート保護を有効にします
構文
property AllowEditObjects: Boolean;
property AllowEditScenarios: Boolean;
property AllowFormatCells: Boolean;
property AllowFormatColumns: Boolean;
property AllowFormatRows: Boolean;
property AllowInsertColumns: Boolean;
property AllowInsertRows: Boolean;
property AllowInsertHyperlinks: Boolean;
property AllowDeleteColumns: Boolean;
property AllowDeleteRows: Boolean;
property AllowSelectLockedCells: Boolean;
property AllowSort: Boolean;
property AllowAutoFilter: Boolean;
property AllowPivotTables: Boolean;
property AllowSelectUnlockedCells: Boolean;
デフォルト値
AllowSelectLockedCells と AllowSelectUnlockedCells のデフォルトは True です。その他の権限プロパティのデフォルトは False です
使用例
Sheet.AllowDeleteRows := True;
Sheet.AllowInsertRows := True;
Sheet.AllowAutoFilter := True;
Sheet.Protect('mypass123');
関連項目