IExcelReader Interface |
var reader = Readers.GetExcelReader(); using(reader.Open(documentApi.OpenRead(ctx.Input.DocumentAttribute))) { var workSheetReader = reader.GetSheet(0); var rowCount = workSheetReader.RowCount; var columnCount = workSheetReader.ColumnCount; for (int row = 0; row < rowCount; row++) { for (int col = 0; col < columnCount; col++) { var value = workSheetReader.Read<string>(row, col); } } }
Namespace: Casewhere.Runtime.IO
public interface IExcelReader : IDisposable, IIOApi
The IExcelReader type exposes the following members.
Name | Description | |
---|---|---|
Close |
Close the connection to an excel file.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
GetSheet |
Get a sheet by its index.
| |
Open(Byte) |
Connect to the byte array of an excel file to prepare for reading.
| |
Open(Stream) |
Connect to the file stream to prepare for reading.
|