Q:

Error while saving output to xlsx file

while running a code that saves the content of a StringBuilder to .xlsx file, It gives me the following error:

Exception in thread "main" java.lang.NoSuchMethodError:
  org.apache.poi.util.POILogger.log(ILjava/lang/Object;Ljava/lang/Throwable;)V
    at
  org.apache.poi.openxml4j.opc.ZipPackage.buildPartName(ZipPackage.java:275)
    at
  org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:214)
    at
  org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:673)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:274)
    at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)    at
  org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:258)

for the following statement:
Workbook book = new XSSFWorkbook(inputStream);

I am using maven, and added the following dependency:
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.8-beta3</version>
    </dependency>

Also, I imported all the necessary classes to deal with Excel files.
I do not know how to solve this problem. I need your help please

A:

The problem is fixed. I changed the POI version. I used the following dependency:
     <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.14-beta1</version>
    </dependency>

