Struct CsvSheet
The single, unnamed sheet of a CsvReader. A value that holds no resources.
public readonly record struct CsvSheet : IExcelSheet, IExcelSheet<IExcelRowEnumerator>, IExcelSheet<CsvReader.Enumerator>, IEquatable<CsvSheet>
- Implements
- Inherited Members
- Extension Methods
Properties
Index
Gets the sheet's zero-based position in its workbook.
public int Index { get; }
Property Value
IsDate1904
Gets a value indicating whether the sheet's workbook uses the 1904 date system.
public bool IsDate1904 { get; }
Property Value
Name
Gets the sheet name. Always the empty string, since a CSV source has a single, unnamed sheet.
public string Name { get; }
Property Value
Visibility
Gets the sheet's visibility. Always Visible: delimited text has no tab bar to hide from.
public ExcelSheetVisibility Visibility { get; }
Property Value
Methods
GetAsyncEnumerator(CancellationToken)
Gets a new enumerator that reads the sheet's rows asynchronously from the start.
public CsvReader.Enumerator GetAsyncEnumerator(CancellationToken ct = default)
Parameters
ctCancellationTokenA token observed by that deferred setup and by every MoveNextAsync() call.
Returns
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.
- InvalidOperationException
The source is a non-seekable stream that was already enumerated.
GetEnumerator()
Gets a new enumerator that reads the sheet's rows synchronously from the start.
public CsvReader.Enumerator GetEnumerator()
Returns
Exceptions
- ObjectDisposedException
The sheet's workbook was disposed.
- InvalidOperationException
The source is a CSV over a non-seekable stream that was already enumerated.
- InvalidOperationException
The source is a non-seekable stream that was already enumerated.