So yesterday when trying to run a program that previously ran perfectly, I received the error shown in the title and I've no idea why. Nothing that could have caused such error was changed, so I've absolutely no idea what the problem could be. Here's the code the error points to.

wbook = new XSSFWorkbook();
input = new FileInputStream("ATM.xlsx");
wbook = WorkbookFactory.create(input); //<<< this is the line there seems to be a problem with

Any ideas?


-I'm using Apache POI to write to and read from excel files.

It seems you had that problem, because your input was "neither an OLE2 stream, nor an OOXML stream".

Check the method for what it is expecting, and make sure you pass a valid parameter to it.