gpt4 book ai didi

java - HSSFArea.java : The method getCells() is undefined for the type AreaReference

转载 作者:行者123 更新时间:2023-12-01 15:52:42 26 4
gpt4 key购买 nike

Eclipse 给我以下错误:对于 AreaReference 类型, getCells() 方法未定义。这很奇怪,因为完全相同的代码在我的另一台计算机上没有给出错误,该计算机运行相同的操作系统和 Eclipse 版本。在工作计算机上,它说该函数(方法?)位于 org.apache.poi.hssf.util.AreaReference,该函数是在开始时导入的。所以看起来它没有正确导入,有什么想法如何解决这个问题吗?以下是 HSSFArea.java 中错误所在的部分。

AreaReference areaReference = getAreaForName(wb, name);
if(areaReference == null) {
return null;
} else {
CellReference[] cellReferences = areaReference.getCells();

提前致谢

最佳答案

这一切都指向不同版本的 jar 。 (兴趣点??)。你如何管理你的依赖管理...(maven?)。

我将确保在两个项目设置中都可以使用正确版本的 jar 作为依赖项。

关于java - HSSFArea.java : The method getCells() is undefined for the type AreaReference,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5692860/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com