I am trying to create a .xlsx file using Apache POI. This is my code:
FileOutputStream outputStream1=null;
XSSFWorkbook workbook = new XSSFWorkbook();
XSSFSheet
Cause of NoClassDefFoundError
is: Definition of class specified in exception was need to execute the code, but it could not be found under the specified package.
Root cause: Usually it turns out that either jar file containing that Class definition was added or it was not added to build path.
You can download apache POI jars for various releases here