有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

使用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]: https://i.stack.imgur.com/Yhz75.png


共 (1) 个答案

  1. # 1 楼答案

    以下是有关poi模式的正确版本和poi:link版本的信息。 删除poi-ooxml-schemas-4.1.2.jarooxml-schemas-1.4.jar并添加poi-ooxm-full