1

我正在使用下面的代码来转换 Excel 单元格中的数值并存储在文本文件中。(阿帕奇POI)

DataFormatter dfrmt = new DataFormatter();
case Cell.CELL_TYPE_NUMERIC:
data.append(dfrmt.formatCellValue(cell));

这个数值被转换并存储在文件中,但问题是当单元格值从零开始时。

Cell Value : 456789   Value in text file : 456789 :: Correct.
Cell Value : 001234   Value in text file : 1234 :: Incorrect.

我想要的是如果excel中的值从零开始,它在文本文件中也应该相同

Cell Value : 001234   Value in text file : 001234 :: this is required
4

0 回答 0