Click or drag to resize

XlsWorksheetBase Methods

The XlsWorksheetBase type exposes the following members.

Methods
Name Description
Public method Activate
Makes the current sheet the active sheet. Equivalent to clicking the sheet's tab in MS Excel.
Protected method AddReference
Increase the quantity of reference. User must use this method when new wrapper on object is created or reference on object stored.
(Inherited from XlsObject .)
Public method AddTextEffectShape
Adds a text effect shape to the worksheet.
Protected method CheckDisposed
Checks whether object was disposed and throws exception if it was.
(Inherited from XlsObject .)
Public method ClearCellImageCache
Clear Cell image array cache,not delete CellImage in cell.
Public method Clone Obsolete.
Creates copy of the current object.
Public method Dispose
Dispose object and free resources.
(Inherited from XlsObject .)
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Destructor. Call dispose method of current object.
(Inherited from XlsObject .)
Protected method FindParent(Type)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParent( Type )
Find parent of object.
(Inherited from XlsObject .)
Protected method FindParent(Type, Boolean)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParents
Finds parent objects.
(Inherited from XlsObject .)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Protected method InitializeCollections
Initializes all required collections.
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Public method MoveSheet
Moves sheet into new position, including chartsheet and worksheet.
Protected method OnDispose
Method which can be overriden by users to take any specific actions when object is disposed.
(Inherited from XlsObject .)
Public method Code example Protect(String)
Protects worksheet with password.protect the sheet except select lock/unlock cells.
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 worksheet with password.
Protected method ReleaseReference
Decrease quantity of Reference. User must call this method when freeing resources.
(Inherited from XlsObject .)
Public method Select
Selects current tab sheet.
Public method SelectTab
Adds sheet tab to the selected tab.
Public method SetChanged
This method should be called after any changes in the worksheet. Sets Saved property of the parent workbook to false.
Protected method SetParent
Sets parent of the object.
(Inherited from XlsObject .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Public method Unprotect
Unprotects this wokrsheet.
Public method Unprotect(String)
Unprotects this worksheet using specified password.
Public method Unselect
Unselects current tab sheet if possible.
Public method Unselect(Boolean)
Unselects current tab sheet if possible.
Top
See Also