Class WorksheetsCollection
- Namespace
- Spire.Xls.Collections
- Assembly
- Spire.XLS.dll
public class WorksheetsCollection : XlsWorksheetsCollection, IList<IWorksheet>, ICollection<IWorksheet>, IEnumerable<IWorksheet>, IExcelApplication, IWorksheets, IEnumerable, ICloneParent
- Inheritance
-
WorksheetsCollection
- Implements
- Inherited Members
Properties
this[int]
Returns a single object from a collection. Read-only.
public Worksheet this[int Index] { get; }
Parameters
Index
int
Property Value
this[string]
Returns a single object from a collection. Read-only.
public Worksheet this[string sheetName] { get; }
Parameters
sheetName
string
Property Value
Methods
Add(string)
Adds a new worksheet.
public Worksheet Add(string name)
Parameters
name
string
Returns
- Worksheet
Added worksheet.
AddCopy(WorksheetsCollection)
Adding worksheets collection to workbook.
public void AddCopy(WorksheetsCollection sheets)
Parameters
sheets
WorksheetsCollection
AddCopy(Worksheet)
Adds copy of worksheet.
public Worksheet AddCopy(Worksheet sheet)
Parameters
sheet
WorksheetWorksheet to copy.
Returns
- Worksheet
Added worksheet.
AddCopy(int)
Adds copy of worksheet.
public Worksheet AddCopy(int sheetIndex)
Parameters
sheetIndex
intSheet index.
Returns
- Worksheet
Added worksheet.
Create()
Creates a new worksheet.
public Worksheet Create()
Returns
Create(string)
Create a new worksheet.
public Worksheet Create(string name)
Parameters
name
stringWorksheet name
Returns
FindAllBool(bool)
Finds the cell with the input bool.
public CellRange[] FindAllBool(bool boolValue)
Parameters
boolValue
boolBool value to search for
Returns
- CellRange[]
Found ranges
FindAllDateTime(DateTime)
Finds the cell with the input datetime.
public CellRange[] FindAllDateTime(DateTime dateTimeValue)
Parameters
dateTimeValue
DateTimeDateTime value to search for
Returns
- CellRange[]
Found ranges
FindAllNumber(double, bool)
Finds the cell with the input double.
public CellRange[] FindAllNumber(double doubleValue, bool formulaValue)
Parameters
doubleValue
doubleDouble value to search for
formulaValue
boolIndicates whether to find formula value
Returns
- CellRange[]
Found ranges
FindAllString(string, bool, bool)
Finds the cell with the input string.
public CellRange[] FindAllString(string stringValue, bool formula, bool formulaValue)
Parameters
stringValue
stringString value to search for
formula
boolIndicates whether include formula
formulaValue
boolIndicates whether include formula value
Returns
- CellRange[]
Found ranges
FindAllTimeSpan(TimeSpan)
Finds the cell with input timespan
public CellRange[] FindAllTimeSpan(TimeSpan timeSpanValue)
Parameters
timeSpanValue
TimeSpantime span value to search for
Returns
- CellRange[]
Found ranges
FindBool(bool)
Finds the cell with the input bool.
public CellRange FindBool(bool boolValue)
Parameters
boolValue
boolBool value to search for
Returns
- CellRange
Found range
FindDateTime(DateTime)
Finds the cell with the input datetime.
public CellRange FindDateTime(DateTime dateTimeValue)
Parameters
dateTimeValue
DateTimeDatetime value to search for
Returns
- CellRange
Found range
FindNumber(double, bool)
Finds the cell with the input double.
public CellRange FindNumber(double doubleValue, bool formulaValue)
Parameters
doubleValue
doubleDouble value to search for
formulaValue
boolIndicates whether includes formula value to search for
Returns
- CellRange
Found range
FindString(string, bool, bool)
Finds the cell with the input string.
public CellRange FindString(string stringValue, bool formula, bool formulaValue)
Parameters
stringValue
stringString value to search for
formula
boolIndicates whether includes formula to search for
formulaValue
boolIndicates whether includes formula value to search for
Returns
- CellRange
Found range
FindTimeSpan(TimeSpan)
Finds the cell with the input time span.
public CellRange FindTimeSpan(TimeSpan timeSpanValue)
Parameters
timeSpanValue
TimeSpanTime span value to search for.
Returns
- CellRange
Found range.
Remove(Worksheet)
Remove worksheet from collection.
public void Remove(Worksheet sheet)
Parameters
sheet
WorksheetWorksheet object.