我正在使用在其中使用getCellNum方法的旧系统
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.11</version>
它的用法:
private void setValue(BpShipment entity, HSSFCell cell) {
if (cell != null) {
int cnum = cell.getCellNum(); // not found error
// the rest of the code
当我开始在一些新代码上使用更新的POI版本时
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
我开始在旧版代码中出现错误,说无法解析getCellNum()。有谁知道在更新的POI版本中getCellNum的替代品是什么?
注意:
旧代码类和新代码类都存在于同一个Maven项目中,因此我只能使用POI依赖项之一,还是可以同时使用两者?谢谢。
它已在不推荐使用的列表中列出:
org.apache.poi.hssf.usermodel.HSSFCell.getCellNum(
)(2008年10月)使用 HSSFCell.getColumnIndex()