HotXLS Docs

Protect method

Protects a Workbook so that it cannot be modified

Syntax

procedure Protect();
procedure Protect(Password: string);
Password Optional string. A string that specifies a case-sensitive password for the Workbook. If this argument is omitted, you can unprotect the Workbook without using a password. Otherwise, you must specify the password to unprotect the Workbook

Example

This example sets the password for the Workbook

Workbook.Protect('mypass123');