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