sheet.protectSheet("secret");
DataValidationHelper dataValidationHelper = sheet.getDataValidationHelper();
DataValidationConstraint dvc = dataValidationHelper.createIntegerConstraint(DataValidationConstraint.OperatorType.BETWEEN, "10", "100");
CellRangeAddressList numericCellAddressList = new CellRangeAddressList(0, 0, 1, 1);
DataValidation dv = dataValidationHelper.createValidation(dvc,numericCellAddressList);
try {
sheet.addValidationData(dv);
} catch (IllegalStateException e) {
String expMsg = "Unexpected (org.apache.poi.hssf.record.PasswordRecord) while looking for DV Table insert pos";
if (expMsg.equals(e.getMessage())) {