java poi导入纯数字等格式问题

用poi导出excel时候,如果单元格设置纯数字,输入的数据一旦过大就是自动显示成科学记数法,导致导入后的数据出错,解决方式,后台获取导出文件后,强制转换单元格属性,就能完美解决,也适用于其他单元格格式引起的数据导入异常 --------------------- 本文来自 linge_etoaker 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/weixin_37497666/article/details/78921443?utm_source=copy

Cell cellCode = r.getCell(1);
cellCode.setCellType(CellType.STRING);  
info.setCode(r.getCell(1).getStringCellValue());

猜你喜欢

转载自blog.csdn.net/zhufengyan521521/article/details/82841809