Table of Contents

Class XlsxWorkbook.Enumerator

Namespace
ExcelReader.Core.Reader.Xlsx
Assembly
ExcelReader.Core.dll

Forward-only enumerator over an XlsxWorkbook sheet's rows.

[SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Public nested enumerator is the standard foreach pattern.")]
public sealed class XlsxWorkbook.Enumerator : PooledStreamRowEnumerator, IExcelRowEnumerator, IDisposable, IAsyncDisposable
Inheritance
PooledStreamRowEnumerator
XlsxWorkbook.Enumerator
Implements
Inherited Members

Remarks

Low-memory: streams the sheet through a refillable pooled buffer, growing it as needed so a single <c>...</c> element is always guaranteed contiguous.

Properties

Current

Gets the row at the enumerator's current position. Only valid after a call to MoveNext() or MoveNextAsync() has returned true.

public Row Current { get; }

Property Value

Row

Methods

MoveNext()

Advances the enumerator to the next row, reading synchronously.

public bool MoveNext()

Returns

bool

true if a row was read; false if the sheet is exhausted.

MoveNextAsync()

Advances the enumerator to the next row, reading asynchronously.

public ValueTask<bool> MoveNextAsync()

Returns

ValueTask<bool>

true if a row was read; false if the sheet is exhausted.