/// <summary>
 /// Creates a new instance of <see cref="IExcelIterator{T}"/> with optional configuration
 /// </summary>
 /// <param name="fileStream">The stream of an excel file</param>
 /// <param name="configuration">The optional configuration.
 /// If not specified the default configuration will be used</param>
 /// <typeparam name="T">The type which represents an item (row) from excel file</typeparam>
 /// <returns>A new instance of <see cref="IExcelIterator{T}"/></returns>
 public static IExcelIterator <T> Create <T>(Stream fileStream, ExcelIteratorConfiguration configuration = null)
     where T : class, new()
 {
     return(new ExcelIterator <T>(fileStream, configuration ?? ExcelIteratorConfigurationBuilder <T> .Default().Build()));
 }
Пример #2
0
 public ExcelIterator(Stream stream, ExcelIteratorConfiguration configuration)
 {
     _configuration = configuration;
     _dataReader    = ExcelReaderFactory.CreateReader(stream);
 }