NativeExcel2 for .Net Developer's Reference

IProtection Interface

Represents the various types of protection options available for a worksheet.

For a list of all members of this type, see IProtection Members.

[Visual Basic]
PublicInterfaceIProtection
[C#]
publicinterfaceIProtection
[C++]
public__gc__interfaceIProtection
[JScript]
publicinterfaceIProtection

Remarks

Use Protection property to return IProtection interface

Example

This example changes the protection options for sheet one

[C#]
book.Worksheets[1].Protection.AllowDeletingColumns = true;
[VisualBasic]
book.Worksheets(i).Protection.AllowDeletingColumns = True
[C++]
book->Worksheets->Item[i]->Protection->AllowDeletingColumns = true;

Requirements

Namespace: NativeExcel

Assembly: NativeExcel (in NativeExcel.dll)

See Also

IProtection Members | NativeExcel Namespace | Protection Property