NPOI Version 2.7.5
File Type
Upload the Excel File
Please attach your original Excel File to help us reproduce the issue
Reproduce Steps
When opening an OOXML using WorkbookFactory.Create(Stream inputStream, string password), the library raises an InvalidFormatException.
This is workign fine in version 2.7.4
Issue Description
The refactoring of the method, is no longer including creating an instance of a PushbackStream before reading the file header. I think this needs to be inserted at line 128 to restore the old behaviour:
public static IWorkbook Create(Stream inputStream, string password)
{
if (inputStream.Length == 0)
throw new EmptyFileException();
// INSERT THIS LINE:
inputStream = new PushbackStream(inputStream);
FileMagic fm = FileMagicContainer.ValueOf(inputStream);
switch (fm)
{