//获取单元格类型
int cellType = row.getCell(j).getCellType();
//解决手机号等数值型内容(excel中单元格设置为文本也不行)变成科学计数法
if (row.getCell(j)!=null){
if (cellType==0){ //cellType为0说明是数值型
DecimalFormat df = new DecimalFormat("#");
columnValueMap.put(headerList.get(j), df.format(row.getCell(j).getNumericCellValue()));
}else {
columnValueMap.put(headerList.get(j), row.getCell(j).toString());
}
}else {
columnValueMap.put(headerList.get(j), null);
}
方法可能不够好,但完美解决