Standardise 'edit' cell dialogue with 'toNumber()' behavior

This commit is contained in:
jamessspanggg 2020-01-07 10:09:28 +08:00
parent e62bb7ac0e
commit 5afd93e2d1

View File

@ -103,7 +103,11 @@ public class EditOneCellCommand extends Command {
Serializable value = null;
if ("number".equals(type)) {
value = Double.parseDouble(valueString);
try {
value = Long.parseLong(valueString);
} catch (NumberFormatException e) {
value = Double.parseDouble(valueString);
}
} else if ("boolean".equals(type)) {
value = "true".equalsIgnoreCase(valueString);
} else if ("date".equals(type)) {