org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

遇到如下错误,

POI读写2007+的excel时

Exception in thread "main" org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62)

错误原因:

xbean的jar包有冲突,删除xbean的包引用POI里的xmlbeans-2.3.0,可正确读取

相关推荐