Click or drag to resize

WorksheetsCollection Class

Represents a collection of Worksheet objects, providing methods and properties for managing multiple worksheets within a workbook.
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.Collections
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public class WorksheetsCollection : XlsWorksheetsCollection

The WorksheetsCollection 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.
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
Public property UseRangesCache
Indicates whether all created range objects should be cached.
(Inherited from XlsWorksheetsCollection .)
Top
Methods
Name Description
Public method Add(String)
Adds a new worksheet.
Public method Add(T)
Adds an item to the collection.trigger OnInsert and OnInsertComplete method when set item
(Inherited from CollectionBase T .)
Public method AddCopy(Int32)
Adds copy of worksheet.
Public method AddCopy(IWorksheet)
Adds copy of worksheet.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopy(IWorksheets)
Adding worksheets collection to current workbook.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopy(Worksheet)
Adds copy of worksheet.
Public method AddCopy(WorksheetsCollection)
Adding worksheets collection to workbook.
Public method AddCopy(Int32, WorksheetCopyType)
Add a copy of the specified worksheet to the worksheet collection.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopy(IWorksheet, WorksheetCopyType)
Adds copy of worksheet.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopy(IWorksheets, WorksheetCopyType)
Adding worksheets collection to current workbook.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopyAfter(IWorksheet)
Adds copy of sheet to collection after choosed sheet.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopyAfter(IWorksheet, IWorksheet)
Adds copy of sheet to collection before choosed sheet.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopyBefore(IWorksheet)
Adds copy of sheet to collection before choosed sheet.
(Inherited from XlsWorksheetsCollection .)
Public method AddCopyBefore(IWorksheet, IWorksheet)
Adds copy of sheet to collection before choosed sheet.
(Inherited from XlsWorksheetsCollection .)
Public method Clear
Clears all items from the collection.
(Inherited from XlsWorksheetsCollection .)
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)
Create a new worksheet.
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.
(Inherited from XlsWorksheetsCollection .)
Protected method FindAll(DateTime)
Finds all CellRange objects that contain the specified DateTime value.
(Inherited from XlsWorksheetsCollection .)
Protected method FindAll(TimeSpan)
Finds all occurrences of a specified time span within a collection and returns their ranges.
(Inherited from XlsWorksheetsCollection .)
Protected method FindAll(Double, FindType)
Finds all cells in the worksheet that match the specified value and criteria.
(Inherited from XlsWorksheetsCollection .)
Protected method FindAll(String, FindType)
Finds all occurrences of a specified value within the worksheet and returns their cell ranges.
(Inherited from XlsWorksheetsCollection .)
Public method FindAll(String, FindType, ExcelFindOptions)
Finds all occurrences of a specified value within the worksheet and returns their ranges.
(Inherited from XlsWorksheetsCollection .)
Public method FindAllBool
Finds the cell with the input bool.
Public method FindAllDateTime
Finds the cell with the input datetime.
Public method FindAllNumber
Finds the cell with the input double.
Public method FindAllString
Finds the cell with the input string.
Public method FindAllTimeSpan
Finds the cell with input timespan
Public method FindBool
Finds the cell with the input bool.
Public method FindDateTime
Finds the cell with the input datetime.
Protected method FindFirst(Boolean)
Finds the first cell in the range that match the bool value.
(Inherited from XlsWorksheetsCollection .)
Protected method FindFirst(DateTime)
Finds the first cell in the range that contains the specified DateTime value.
(Inherited from XlsWorksheetsCollection .)
Protected method FindFirst(TimeSpan)
Finds the first occurrence of a cell with a value matching the specified TimeSpan within the range.
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
Protected method FindFirst(String, FindType)
Finds the first occurrence of a specified value within the range.
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
Public method FindNumber
Finds the cell with the input double.
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 FindString
Finds the cell with the input string.
Public method FindTimeSpan
Finds the cell with the input time span.
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.
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
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..
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
Public method Remove(String)
Removes specified worksheet from the collection.
(Inherited from XlsWorksheetsCollection .)
Public method Remove(IWorksheet)
Remove specified worksheet from workbook collection.
(Inherited from XlsWorksheetsCollection .)
Public method Remove(Worksheet)
Remove worksheet from collection.
Public method RemoveAt
Removes specified worksheet from the collection.
(Inherited from XlsWorksheetsCollection .)
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.
(Inherited from XlsWorksheetsCollection .)
Public method UpdateStringIndexes Obsolete.
Updates string indexes.
(Inherited from XlsWorksheetsCollection .)
Top
Events
See Also