HotXLS Delphi Excel Read Write Library / Component Developers Guide loslab Inc.

UnProtect method

Removes protection from a Workbook. This method has no effect if the Workbook isn't protected.

Syntax

procedure UnProtect();
procedure UnProtect(Password: string);
procedure UnProtect(Password: string; lcid: Integer);
Password String. A string that denotes the case-sensitive password to use to unprotect the Workbook. If the Workbook isn't protected with a password, this argument is ignored.
lcid Integer. The locale ID.

Example

This example removes protection from the Workbook.

Workbook.UnProtect('mypass123');
Copyright©2007-2019 loslab.com