Class ExcelWorksheets¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
The collection of worksheets for the workbook
Inheritance¶
object ← XmlHelper ← ExcelWorksheets
Implements¶
IDisposable
IEnumerable
IEnumerable<ExcelWorksheet>
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
Count¶
Returns the number of worksheets in the workbook
Property Value¶
this[int]¶
Returns the worksheet at the specified position.
Property Value¶
See Also¶
this[string]¶
Returns the worksheet matching the specified name
Property Value¶
Methods¶
Add(string)¶
Adds a new blank worksheet.
Parameters¶
Name string
The name of the workbook
Returns¶
Add(string, ExcelWorksheet)¶
Adds a copy of a worksheet
Parameters¶
Name string
The name of the workbook
Copy ExcelWorksheet
The worksheet to be copied
Returns¶
AddChart(string, eChartType)¶
Adds a chartsheet to the workbook.
Parameters¶
Name string
The name of the worksheet
chartType eChartType
The type of chart
Returns¶
AddChart(string, eChartType, ExcelPivotTable)¶
Adds a chartsheet to the workbook.
public ExcelChartsheet AddChart(string Name, eChartType chartType, ExcelPivotTable pivotTableSource)
Parameters¶
Name string
The name of the worksheet
chartType eChartType
The type of chart
pivotTableSource ExcelPivotTable
The pivottable source
Returns¶
AddStockChart(string, ExcelRangeBase, ExcelRangeBase, ExcelRangeBase, ExcelRangeBase, ExcelRangeBase, ExcelRangeBase)¶
Adds a stock chart sheet to the workbook.
public ExcelChartsheet AddStockChart(string Name, ExcelRangeBase CategorySerie, ExcelRangeBase HighSerie, ExcelRangeBase LowSerie, ExcelRangeBase CloseSerie, ExcelRangeBase OpenSerie = null, ExcelRangeBase VolumeSerie = null)
Parameters¶
Name string
The name of the worksheet
CategorySerie ExcelRangeBase
The category serie. A serie containing dates or names
HighSerie ExcelRangeBase
The high price serie
LowSerie ExcelRangeBase
The low price serie
CloseSerie ExcelRangeBase
The close price serie containing
OpenSerie ExcelRangeBase
The opening price serie. Supplying this serie will create a StockOHLC or StockVOHLC chart
VolumeSerie ExcelRangeBase
The volume represented as a column chart. Supplying this serie will create a StockVHLC or StockVOHLC chart
Returns¶
Copy(string, string)¶
Copies the named worksheet and creates a new worksheet in the same workbook
Parameters¶
Name string
The name of the existing worksheet
NewName string
The name of the new worksheet to create
Returns¶
The new copy added to the end of the worksheets collection
Delete(int)¶
Deletes a worksheet from the collection
Parameters¶
Index int
The position of the worksheet in the workbook
Delete(string)¶
Deletes a worksheet from the collection
Parameters¶
name string
The name of the worksheet in the workbook
Delete(ExcelWorksheet)¶
Delete a worksheet from the collection
Parameters¶
Worksheet ExcelWorksheet
The worksheet to delete
DeleteAll(Predicate<ExcelWorksheet>)¶
Deletes all worksheets that matches the Predicate from the collection of worksheets
Parameters¶
match Predicate<ExcelWorksheet>
Exceptions¶
Dispose()¶
Dispose the worksheets collection
GetEnumerator()¶
Foreach support
Returns¶
An enumerator
MoveAfter(string, string)¶
Moves the source worksheet to the position after the target worksheet
Parameters¶
sourceName string
The name of the source worksheet
targetName string
The name of the target worksheet
MoveAfter(int, int)¶
Moves the source worksheet to the position after the target worksheet
Parameters¶
sourcePositionId int
The id of the source worksheet
targetPositionId int
The id of the target worksheet
MoveBefore(string, string)¶
Moves the source worksheet to the position before the target worksheet
Parameters¶
sourceName string
The name of the source worksheet
targetName string
The name of the target worksheet
MoveBefore(int, int)¶
Moves the source worksheet to the position before the target worksheet
Parameters¶
sourcePositionId int
The id of the source worksheet
targetPositionId int
The id of the target worksheet
MoveToEnd(string)¶
Moves the source worksheet to the end of the worksheets collection
Parameters¶
sourceName string
The name of the source worksheet
MoveToEnd(int)¶
Moves the source worksheet to the end of the worksheets collection
Parameters¶
sourcePositionId int
The position of the source worksheet
MoveToStart(string)¶
Moves the source worksheet to the start of the worksheets collection
Parameters¶
sourceName string
The name of the source worksheet
MoveToStart(int)¶
Moves the source worksheet to the start of the worksheets collection
Parameters¶
sourcePositionId int
The position of the source worksheet