打表工具支持long类型
parent
fbceab8579
commit
39ac72688b
|
@ -394,10 +394,17 @@ public class ExcelUtils {
|
||||||
//判断cell类型
|
//判断cell类型
|
||||||
switch (cell.getCellType()) {
|
switch (cell.getCellType()) {
|
||||||
case Cell.CELL_TYPE_NUMERIC: {
|
case Cell.CELL_TYPE_NUMERIC: {
|
||||||
if (cellType != null && cellType.toString().contains("float")){
|
|
||||||
cellValue = cell.getNumericCellValue();
|
if(cellType==null){
|
||||||
}else{
|
|
||||||
cellValue = (int) cell.getNumericCellValue();
|
cellValue = (int) cell.getNumericCellValue();
|
||||||
|
}else{
|
||||||
|
if(cellType.toString().contains("float")){
|
||||||
|
cellValue = cell.getNumericCellValue();
|
||||||
|
}else if(cellType.toString().contains("long")){
|
||||||
|
cellValue = (long)cell.getNumericCellValue();
|
||||||
|
}else{
|
||||||
|
cellValue = (int) cell.getNumericCellValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue