Table of Contents

Interface IExcelSheet<TEnumerator>

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

One sheet's rows, typed to the concrete enumerator it hands out (TEnumerator) so callers read without boxing to IExcelRowEnumerator.

public interface IExcelSheet<TEnumerator> where TEnumerator : IExcelRowEnumerator

Type Parameters

TEnumerator

The concrete row enumerator type this sheet produces.

Remarks

Only ExcelReader implements this interface, and a minor version can add members to it. See versioning and compatibility.

Properties

IsDate1904

Gets a value indicating whether the sheet's workbook uses the 1904 date system.

bool IsDate1904 { get; }

Property Value

bool

Methods

GetAsyncEnumerator(CancellationToken)

Gets a new enumerator that reads the sheet's rows asynchronously from the start.

TEnumerator GetAsyncEnumerator(CancellationToken ct = default)

Parameters

ct CancellationToken

A token observed by that deferred setup and by every MoveNextAsync() call.

Returns

TEnumerator

Remarks

Setup that needs I/O, such as opening the sheet part or loading shared strings, runs on the first MoveNextAsync(), so this call does not block.

Exceptions

ObjectDisposedException

The sheet's workbook was disposed.

InvalidOperationException

The source is a CSV over a non-seekable stream that was already enumerated.

GetEnumerator()

Gets a new enumerator that reads the sheet's rows synchronously from the start.

TEnumerator GetEnumerator()

Returns

TEnumerator

Exceptions

ObjectDisposedException

The sheet's workbook was disposed.

InvalidOperationException

The source is a CSV over a non-seekable stream that was already enumerated.