Click or drag to resize

XlsWorksheetsCollection Class

A collection of all the Worksheet objects in the specified or active workbook. Each Worksheet object represents a worksheet.
Inheritance Hierarchy
System Object
Spire.Xls.Core.Spreadsheet.Collections CollectionBase IWorksheet
Spire.Xls.Core.Spreadsheet.Collections CollectionExtended IWorksheet
Spire.Xls.Core.Spreadsheet.Collections XlsWorksheetsCollection
Spire.Xls.Collections WorksheetsCollection

Namespace: Spire.Xls.Core.Spreadsheet.Collections
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public class XlsWorksheetsCollection : CollectionExtended<IWorksheet>, 
	IWorksheets, IEnumerable, ICloneParent

The XlsWorksheetsCollection type exposes the following members.

Properties
Name Description
Public property Capacity
Gets or sets the number of elements that the System.Collections.CollectionBase can contain.
(Inherited from CollectionBase T .)
Public property Count
Gets the number of elements contained in the System.Collections.CollectionBase instance.
(Inherited from CollectionBase T .)
Protected property InnerList
Gets the list of elements in the instance.
(Inherited from CollectionBase T .)
Public property IsReadOnly
Gets a value indicating whether the collection is read-only.
(Inherited from CollectionBase T .)
Public property IsRightToLeft
Determines whether the text direction is right-to-left.
Public property Item Int32
Returns a single object from a collection. Read-only.
Public property Item String
Returns a single object from a collection. Read-only.
Protected property List
Gets the list of elements in the instance.
(Inherited from CollectionBase T .)
Public property Parent
Read-oonly. The parent object for the specified object.
(Inherited from CollectionExtended T .)
Public property UseHashForWorksheetLookup
Toggles worksheet search algorithm when searching worksheet by name.
Public property UseRangesCache
Indicates whether all created range objects should be cached.
Top
Methods
Name Description
Public method Add(T)
Adds an item to the collection.trigger OnInsert and OnInsertComplete method when set item
(Inherited from CollectionBase T .)
Public method Add(String)
Adds an empty worksheet.
Public method AddCopy(Int32)
Adds a copy of the worksheet at the specified index to the workbook.
Public method AddCopy(IWorksheet)
Adds copy of worksheet.
Public method AddCopy(IWorksheets)
Adding worksheets collection to current workbook.
Public method AddCopy(Int32, WorksheetCopyType)
Add a copy of the specified worksheet to the worksheet collection.
Public method AddCopy(IWorksheet, WorksheetCopyType)
Adds copy of worksheet.
Public method AddCopy(IWorksheets, WorksheetCopyType)
Adding worksheets collection to current workbook.
Public method AddCopyAfter(IWorksheet)
Adds copy of sheet to collection after choosed sheet.
Public method AddCopyAfter(IWorksheet, IWorksheet)
Adds copy of sheet to collection before choosed sheet.
Public method AddCopyBefore(IWorksheet)
Adds copy of sheet to collection before choosed sheet.
Public method AddCopyBefore(IWorksheet, IWorksheet)
Adds copy of sheet to collection before choosed sheet.
Public method Clear
Clears all items from the collection.
Public method Clone
Creates copy of the collection.
(Inherited from CollectionExtended T .)
Public method Contains
Determines whether the collection contains a specific item.
(Inherited from CollectionBase T .)
Public method CopyTo
Copies the elements of the collection to an array, starting at a particular array index.
(Inherited from CollectionBase T .)
Public method Create
Creates a new worksheet.
Public method Create(String)
Creates a new worksheet with the specified name.
Public method EnsureCapacity
Enlarges internal storage if necessary.
(Inherited from CollectionExtended T .)
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object .)
Protected method FindAll(Boolean)
Finds all cell ranges based on the specified condition.
Protected method FindAll(DateTime)
Finds all CellRange objects that contain the specified DateTime value.
Protected method FindAll(TimeSpan)
Finds all occurrences of a specified time span within a collection and returns their ranges.
Protected method FindAll(Double, FindType)
Finds all cells in the worksheet that match the specified value and criteria.
Protected method FindAll(String, FindType)
Finds all occurrences of a specified value within the worksheet and returns their cell ranges.
Public method FindAll(String, FindType, ExcelFindOptions)
Finds all occurrences of a specified value within the worksheet and returns their ranges.
Protected method FindFirst(Boolean)
Finds the first cell in the range that match the bool value.
Protected method FindFirst(DateTime)
Finds the first cell in the range that contains the specified DateTime value.
Protected method FindFirst(TimeSpan)
Finds the first occurrence of a cell with a value matching the specified TimeSpan within the range.
Protected method FindFirst(Double, FindType)
Finds the first cell in the range that matches the specified numeric value, considering the search flags to determine whether to look in formula values or numeric values.
Protected method FindFirst(String, FindType)
Finds the first occurrence of a specified value within the range.
Public method FindFirst(String, FindType, ExcelFindOptions)
Finds the first occurrence of a specified value within the range based on the given find type and options.
Protected method FindParent(Type)
Method used to find parent within a specific type.
(Inherited from CollectionExtended T .)
Protected method FindParent(Type, Boolean)
Method used to find parent within a specific type.
(Inherited from CollectionExtended T .)
Public method GetEnumerator
Returns an enumerator that iterates through this instance.
(Inherited from CollectionBase T .)
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 .)
Public method IndexOf
Returns the zero-based index of the first occurrence of a specified item within the collection.
(Inherited from CollectionBase T .)
Public method InnerAdd
Adds data to the specified worksheet.
Protected method InnerRemove
Removes the element at the specified index of the collection. This method is accessible to derived classes and classes within the same assembly.
Public method Insert
Inserts an element into the list at the specified index.
(Inherited from CollectionBase T .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Public method Move
Moves worksheet..
Protected method OnClear
OnClear is invoked before Clear behavior.
(Inherited from CollectionExtended T .)
Protected method OnClearComplete
OnClear is invoked after Clear behavior.
(Inherited from CollectionExtended T .)
Protected method OnInsert
Performs additional processes before inserting a new element into the collection.
(Inherited from CollectionExtended T .)
Protected method OnInsertComplete
Performs additional processes after inserting a new element into the collection.
(Inherited from CollectionExtended T .)
Protected method OnRemove
Performs additional processes before removing an element from the collection.
(Inherited from CollectionExtended T .)
Protected method OnRemoveComplete
Performs additional processes after removing an element from the collection.
(Inherited from CollectionExtended T .)
Protected method OnSet
Performs additional processes before setting a value in the collection.
(Inherited from CollectionExtended T .)
Protected method OnSetComplete
Performs additional processes after setting a value in the collection.
(Inherited from CollectionExtended T .)
Public method Remove(Int32)
Removes specified worksheet from the collection.
Public method Remove(String)
Removes specified worksheet from the collection.
Public method Remove(IWorksheet)
Remove specified worksheet from workbook collection.
Public method RemoveAt
Removes specified worksheet from the collection.
Protected method SetParent
Sets parent object for class.
(Inherited from CollectionExtended T .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Public method UpdateSheetIndex Obsolete.
Updates sheet index after move/insert operation.
Public method UpdateStringIndexes Obsolete.
Updates string indexes.
Top
Events
See Also