При попытке доступа к данным из excel2010 выдается ошибка. Код ...
public static void main(String[] args) {
FileInputStream fis=new FileInputStream("D:\\Java Pgms\\Book1.xlsx");
Workbook wk= WorkbookFactory.create(fis);
Sheet s=wk.getSheet("Sheet1");
Row r= s.getRow(1);
Cell c=r.getCell(0);
String t=c.getStringCellValue();
System.out.println(t);
}
сообщение об ошибке
java.io.IOException: org/apache/commons/compress/archivers/zip/ZipFile
atorg.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:326)
at org.apache.poi.ss.usermodel.WorkbookFactory.createXSSFWorkbook(WorkbookFactory.java:296)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:214)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:180)
at demoPack.Excell.main(Excell.java:21)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFile
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:298)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:314)
... 4 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.archivers.zip.ZipFile
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more