使用Apache POI设置单元格值时出现java NoSuchMethod错误
我在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)
# 1 楼答案
以下是有关poi模式的正确版本和poi:link版本的信息。 删除
poi-ooxml-schemas-4.1.2.jar
和ooxml-schemas-1.4.jar
并添加poi-ooxm-full