Click or drag to resize

IWorksheet Protect Method

Overload List
Name Description
Public method Code example Protect(String)
Protects worksheet's content with password.
Examples
The following code illustrates how to protect the sheet except select lock/unlock cells:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Protects the first worksheet's content with password</para><para>worksheet.Protect("123456");</para><para>//Save to file</para><para>workbook.SaveToFile("Protect.xlsx");</para>
Public method Protect(String, SheetProtectionType)
Protects current worksheet.
(Inherited from ITabSheet .)
Top
See Also