Java ApachePOI和CellType
我对这个版本有点迷茫Java ApachePOI和CellType,java,apache-poi,apache-poi-4,Java,Apache Poi,Apache Poi 4,我对这个版本有点迷茫 <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> 或 我无法获得没有弃用或类型错误的代码:-( 我正在将Eclipe与Maven和Java 11一起使用。在版本发布后,我执行了“更新项目”来更新Maven。在ApachePOI3.17中。getCellType返回int,但不推荐使用。Cell.getCellTypeEnum返回CellT
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
或
我无法获得没有弃用或类型错误的代码:-(
我正在将Eclipe与Maven和Java 11一起使用。在版本发布后,我执行了“更新项目”来更新Maven。在
ApachePOI3.17
中。getCellType
返回int
,但不推荐使用。Cell.getCellTypeEnum
返回CellType
。请参阅
因此,使用ApachePOI3.17必须
if (cell.getCellTypeEnum() == CellType.NUMERIC)
if (cell.getCellType() == CellType.NUMERIC)
在apache poi
大于或等于版本4.0.0
单元格中。getCellType
返回CellType
单元格。getCellTypeEnum也返回CellType
但已弃用。请参阅
因此,使用apachepoi
大于或等于版本4.0.0
必须
if (cell.getCellTypeEnum() == CellType.NUMERIC)
if (cell.getCellType() == CellType.NUMERIC)
在
apache poi 3.17
Cell.getCellType
返回int
但已被弃用。Cell.getCellTypeEnum
返回CellType
。请参阅
因此,使用ApachePOI3.17必须
if (cell.getCellTypeEnum() == CellType.NUMERIC)
if (cell.getCellType() == CellType.NUMERIC)
在apache poi
大于或等于版本4.0.0
单元格中。getCellType
返回CellType
单元格。getCellTypeEnum也返回CellType
但已弃用。请参阅
因此,使用apachepoi
大于或等于版本4.0.0
必须
if (cell.getCellTypeEnum() == CellType.NUMERIC)
if (cell.getCellType() == CellType.NUMERIC)
我尝试过,但Eclipse不接受删除不赞成的内容。@chris01:然后Eclipse做了一些错误的事情。或者您在一个项目中混合了不同的
apache poi
版本。我尝试过,但Eclipse不接受删除不赞成的内容。@chris01:然后Eclipse做了一些错误的事情。或者您混合了不同的apache poi
一个项目中的版本。