我正在尝试读取 xlsx 文件以获取数据表单文件,但我的代码会像这样生成
apache poi 不起作用或无法帮助读取 xlsx 文件
任何人都可以告诉我需要做什么来解决此错误
或以其他方式在 java 中读取 xlsx 文件
Exception in thread "main" java.lang.IllegalStateException: Zip File is closed
at org.apache.poi.openxml4j.util.ZipFileZipEntrySource.getEntries(ZipFileZipEntrySource.java:45)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:161)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:662)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:223)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:186)
at ExampleEventUserModel.processOneSheet(ExampleEventUserModel.java:18)
at ExampleEventUserModel.main(ExampleEventUserModel.java:115)