excel import support BigDecimal
This commit is contained in:
@@ -11,6 +11,7 @@ import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@@ -449,6 +450,8 @@ public class ExcelImport implements Closeable {
|
||||
val = Double.valueOf(val.toString());
|
||||
}else if (valType == Float.class){
|
||||
val = Float.valueOf(val.toString());
|
||||
}else if (valType == BigDecimal.class){
|
||||
val = new BigDecimal(val.toString());
|
||||
}else if (valType == Date.class){
|
||||
if (val instanceof String){
|
||||
val = DateUtils.parseDate(val);
|
||||
|
||||
Reference in New Issue
Block a user