Exception in thread "main" org.apache.poi.POIXMLException: ]
java.lang.reflect.InvocationTargetException
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:277)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:186)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:189)
at com.simplecode.excel.XlstoCSV.xls(XlstoCSV.java:26)
at com.simplecode.excel.XlstoCSV.main(XlstoCSV.java:86)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getMethod0(Class.java:2642)
at java.lang.Class.getMethod(Class.java:1579)
at org.apache.xmlbeans.XmlBeans.buildMethod(XmlBeans.java:174)
at org.apache.xmlbeans.XmlBeans.buildNodeMethod(XmlBeans.java:195)
at org.apache.xmlbeans.XmlBeans.buildNodeToCursorMethod(XmlBeans.java:232)
at org.apache.xmlbeans.XmlBeans.<clinit>(XmlBeans.java:131)
at org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument$Factory.parse(Unknown Source)
at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:39)
答案 0 :(得分:2)
您缺少包含javax.xml.stream.jar
文件。
答案 1 :(得分:-1)
使用相同的Apache POI(Microsoft文档的Java API)版本的jar即可解决此问题,只需添加相同版本的jar
各个罐子解决了
枪手列表-