Java 使用Apache POI设置单元格值时出现NoSuchMethod错误
我在Java 使用Apache POI设置单元格值时出现NoSuchMethod错误,java,excel,apache-poi,Java,Excel,Apache Poi,我在cell.setCellValue(“sdjcb”)处发现以下错误:; 谁能帮忙吗 Exception in thread "main" java.lang.NoSuchMethodError: 'org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STXstring org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst.xgetT()' at
cell.setCellValue(“sdjcb”)
处发现以下错误:;
谁能帮忙吗
Exception in thread "main" java.lang.NoSuchMethodError: 'org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STXstring org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst.xgetT()'
at org.apache.poi.xssf.usermodel.XSSFRichTextString.<init>(XSSFRichTextString.java:92)
at org.apache.poi.xssf.usermodel.XSSFCell.setCellType(XSSFCell.java:928)
at org.apache.poi.xssf.usermodel.XSSFCell.setCellTypeImpl(XSSFCell.java:903)[![enter image description here][1]][1]
at org.apache.poi.ss.usermodel.CellBase.setCellType(CellBase.java:57)
线程“main”java.lang.NoSuchMethodError中的异常:'org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STXstring org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst.xgetT()'
位于org.apache.poi.xssf.usermodel.XSSFRichTextString.(XSSFRichTextString.java:92)
位于org.apache.poi.xssf.usermodel.XSSFCell.setCellType(XSSFCell.java:928)
在org.apache.poi.xssf.usermodel.XSSFCell.setCellTypeImpl(XSSFCell.java:903)[![在此处输入图像描述][1][1]
位于org.apache.poi.ss.usermodel.CellBase.setCellType(CellBase.java:57)
以下是有关poi架构的正确版本和poi版本的信息:。
删除
poi-ooxml-schemas-4.1.2.jar
和ooxml-schemas-1.4.jar
并添加poi-ooxm-full
项目中的Apache poi和Java版本是什么?看起来类路径上的Apache poi jar不匹配。如何添加依赖项?如何部署它们?您的类路径上还有什么?@arch2be java 15和apache POI 5versions@Gagravarr请查找我正在使用的所有最新版本的版本列表的更新问题。有一个ooxml模式版本的信息。如果使用POI 5.0.0及更新版本,则应使用POI ooxml full jar。但是删除ooxml-schemas-1.4.jar