24,923
社区成员
发帖
与我相关
我的任务
分享
ZipInputStream in = null;
List errors=null;
// FileInputStream(path+fileName));
try {
in = new ZipInputStream(new FileInputStream(path + "\\" + fileName));
ZipEntry entry = new ZipEntry(path + "\\" + fileName);
while ((entry = in.getNextEntry()) != null) {
String entryName = entry.getName();
if (entry.isDirectory()) {
File file1 = new File(path + "\\" + entryName);
file1.mkdirs();
// System.out.println("创建文件夹" + entryName);
} else {
System.out.println(path + "\\" + entryName);
POIFSFileSystem poi = new POIFSFileSystem(new FileInputStream(path+"\\"+fileName)); HSSFWorkbook book = new HSSFWorkbook(poi);
}
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
in.closeEntry();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
D:\work\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JS\tmp\ko.zip
D:\work\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JS\tmp\test.xls
java.io.FileNotFoundException: D:\work\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JS\tmp\test.xls (系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at ie.js.tyxxc.service.impl.TyxxcSiteDenizenServiceImpl.isQualified(TyxxcSiteDenizenServiceImpl.java:116)
at ie.js.tyxxc.service.impl.TyxxcSiteDenizenServiceImpl.upload(TyxxcSiteDenizenServiceImpl.java:81)
at ie.js.tyxxc.service.impl.TyxxcSiteDenizenServiceImpl$$FastClassByCGLIB$$c398d221.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
at ie.js.tyxxc.service.impl.TyxxcSiteDenizenServiceImpl$$EnhancerByCGLIB$$4df71e08.upload(<generated>)
at ie.js.tyxxc.action.TyxxcSiteDenizenAction.parse(TyxxcSiteDenizenAction.java:259)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)