[]
你可以使用 IValidation 接口的 delete 方法删除应用于工作表中某个单元格或单元格区域的数据验证。
使用详情参考以下代码
Calendar time1 = new GregorianCalendar(1899, 11, 30, 13, 30, 0);
Calendar time2 = new GregorianCalendar(1899, 11, 30, 18, 30, 0);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm:ss");
// Add Validation
worksheet.getRange("A1:A2").getValidation().add(ValidationType.Date, ValidationAlertStyle.Stop,
ValidationOperator.Between, simpleDateFormat.format(time1.getTime()),
simpleDateFormat.format(time2.getTime()));
// Delete validation.
worksheet.getRange("A1:A2").getValidation().delete();