I am referencing the version 3.7 of the Apache POI and I am getting a "cannot be resolved" error when I do:
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
Other import statements that reference POI DO NOT give me errors, such as:
import org.apache.poi.ss.usermodel.*;
Any ideas??
You did not described the environment, anyway, you should download apache poi libraries. If you are using eclipse , right click on your root project , so properties and in java build path add external jar and import in your project those libraries :
xmlbeans-2.6.0 ; poi-ooxml-schemas- ... ; poi-ooxml- ... ; poi- .... ;
If you use Maven:
poi => poi-ooxml in artifactId
I added below contents in app "build.gradle"
I had the same problem, so I dug through the poi-3.17.jar file and there was no xssf package inside.
I then went through the other files and found xssf int the poi-ooxml-3.17.jar
So it seems the solutions is to add
to your project, as that seems to make it work (for me at least)