I'm trying to deliver a jar using POI 4.0 to a coworker who's running on Windows 10. I can load an excel file without any errors. However, on Windows 10, I get the following error: ----- java.io.IOException: java.lang.NoSuchMethodException: org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(sun.awt.shell.Win32ShellFolder2, boolean) ----- The error occurs when I use the following line: ----- workbook = WorkbookFactory.create(file,null,true); ----- Any ideas on how to get the workbook to load in Windows 10?
Fixed the issue by instantiating an XSSFWorkbook instead of using the WorkbookFactory
Actually your imports are wrong ... instead of "sun.awt.shell.Win32ShellFolder2" you would have needed to import "java.io.File".