apache POI java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFile

For poi-4.1.0 I had to add these to the classpath: dom4j-1.6.jar xmlbeans-3.1.0.jar commons-collections4-4.3.jar commons-compress-1.18.jar Only then did this work for Excel.xlsx File:

ExcelWBook = new XSSFWorkbook(ExcelFile);

Try searching for the class name then jar download you might find the specified jar files. "ex: XWPF jar files download." and download the classes of XWPF as jar files i got this problem before and I solved it like this but for me it was pdfBox. PS: Try searching for jar files for "org.apache.poi.xwpf" you will get more results.