ExcelCellCollection Class
Collection of excel cells (ExcelCell).
public sealed class ExcelCellCollection : ExcelRowColumnCellCollectionBase, IEnumerable<ExcelCell>, IEnumerable
Public NotInheritable Class ExcelCellCollection
Inherits ExcelRowColumnCellCollectionBase
Implements IEnumerable(Of ExcelCell), IEnumerable
- Inheritance:
- System.ObjectExcelCellCollection
Properties
Count
Gets the number of currently allocated elements (dynamically changes when worksheet is modified -- read remarks).
public sealed override int Count { get; }
Public NotOverridable Overrides ReadOnly Property Count As Integer
Property Value
- System.Int32
Overrides
Remarks
The cells are internally allocated in rows and not in columns. In other words, when you load CSV/XLS/XLSX or access some cells via worksheet.Cells property new rows and cells can be allocated but the column count will stay the same. To find last used column in the worksheet, use GemBox.Spreadsheet.ExcelWorksheet.GetUsedCellRange method.
Item[Int32]
Gets the cell with the specified index.
public ExcelCell this[int index] { get; }
Public ReadOnly Property Item(index As Integer) As ExcelCell
Parameters
index
- System.Int32
The zero-based index of the cell.
Property Value
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<ExcelCell> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of ExcelCell)
Returns
- System.Collections.Generic.IEnumerator<ExcelCell>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable