Release 1.6.1 29 June 2005 |
Developer's reference |
![]() |
Reference > N_XLS_WORKSHEET > of_protect |
of_protect() method
Protect a worksheet from modification.
Syntax
worksheet.of_protect ( password ) |
Parameters
Password | A string whose value is the password |
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs.
Description
The of_protect() method also has the effect of enabling a cell's locked and hidden properties if they have been set. A "locked" cell cannot be edited. A "hidden" cell will display the results of a formula but not the formula itself. In Excel a cell's locked property is on by default.
Examples
worksheet.of_protect ( 'mypass' )
© 2003-2005 Desta, Ltd. All rights reserved. | SupportDesk |