Hi,
We are using ExcelMapper 6.0.612 and NPOI 2.7.5
When trying to load data from a stream using FetchAsync:
var queryXls = await new ExcelMapper().FetchAsync<MapExcel>( stream, "SheetName" );
We get the exception below:
NPOI.OpenXml4Net.Exceptions.InvalidFormatException : Your InputStream was neither an OLE2 stream, nor an OOXML stream
at NPOI.SS.UserModel.WorkbookFactory.Create(Stream inputStream, String password)
at NPOI.SS.UserModel.WorkbookFactory.Create(Stream inputStream)
at Ganss.Excel.ExcelMapper.Fetch(Stream stream, Type type, String sheetName, Func`2 valueConverter)
at Ganss.Excel.ExcelMapper.FetchAsync(Stream stream, Type type, String sheetName, Func`2 valueConverter)
at Ganss.Excel.ExcelMapper.FetchAsync[T](Stream stream, String sheetName, Func`2 valueConverter)
If we use the NPOI FileMagicContainer.ValueOf(steam) the type is OOXML.
If we use the sync method Fetch below it works.
var queryXls = new ExcelMapper( stream ).Fetch<MapExcel>( "SheetName" );