// 最开始是这么写的
DataValidationConstraint dateConstraint = validationHelper
.createDateConstraint(DVConstraint.OperatorType.BETWEEN, "1900/1/1", "2100/1/1", "yyyy/m/d");
结果导出的excel中校验数据有效性多出了一个=,导致校验有误
解决办法:时间上限和下限加一个date函数
DataValidationConstraint dateConstraint = validationHelper
.createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "date(1900,1,1)", "date(2099,12,31)", "yyyy/MM/dd");
网友评论