poi 读取Excel *一类大数字时会变成带E的数

解决办法1:在读取数据进行判断时,若为数字类型:

if(cell.getCellType() == Cell.CELL_TYPE_NUMERIC){   //数字
    if(String.valueOf(cell.getNumericCellValue()).indexOf("E")==-1){
        return String.valueOf(cell.getNumericCellValue());
    }else {
        return new DecimalFormat("#").format(cell.getNumericCellValue());
    }

}


————————————————

解决办法2:在读取数据进行判断时,设置为字符类型:

row.getCell(4).setCellType(Cell.CELL_TYPE_STRING);
Phone = row.getCell(4).getStringCellValue();
原文地址:https://www.cnblogs.com/Fooo/p/12834700.html