gpt4 book ai didi

java - 不推荐使用 XSSFCell 类型的 setCellType(int) 方法

转载 作者:行者123 更新时间:2023-11-30 06:14:05 27 4
gpt4 key购买 nike

哪个是此弃用代码的替代方案?

cell.setCellType(XSSFCell.CELL_TYPE_NUMERIC);

//... cell is of XSSFCell type

我正在使用 Apache POI 3.17

最佳答案

'org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC' 已弃用。改用'org.apache.poi.ss.usermodel.CellType.NUMERIC'。

// import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
// tCell.setCellType(Cell.CELL_TYPE_NUMERIC); // <-- deprecated
setCellType(CellType.NUMERIC);

关于java - 不推荐使用 XSSFCell 类型的 setCellType(int) 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49607100/

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