Skip to content
Advertisement

NoClassDefFoundError: UnsupportedFileFormatException while using apache poi to write to an excel file

I am trying to write to an excel(.xlsx) file using Apache poi, I included the apache poi dependencies in my pom.xml file. But I am getting the following exception in execution.

JavaScript

The code and pom.xml is specified as follows.

I am getting the exception in the following line.

JavaScript

Code:

JavaScript

Pom:

JavaScript

Advertisement

Answer

I think You’r missing some classes “UnsupportedFileFormatException”

try to change the poi versions to the same and dont use the 3.11-beta2

You can use both in version 3.12 http://mvnrepository.com/artifact/org.apache.poi

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement