I'm trying to read a simple .xlsx in java
private void readExcelData(String excel) throws Exception {
FileInputStream file = new FileInputStream(excel);
XSSFWorkbook workbook = new XSSFWorkbook(file);
XSSFSheet sheet = workbook.getSheetAt(0);
}
but i get Exception in thread "AWT-EventQueue-0" java.lang.IncompatibleClassChangeError: Found interface org.apache.poi.util.POILogger, but class was expected
I had to add xmlbeans-xmlpublic-2.3.0.jar or it gives me Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException
Maybe it has something to do with that.
Does someone have a solution ?