if (range.getSheet() instanceof HSSFSheet) {
//TODO: not yet implemented for 2003
}else{
final DataValidationHelper helper = range.getSheet().getDataValidationHelper();
CellRangeAddress refCRA = new CellRangeAddress(ref.getRow(),ref.getLastRow(),ref.getColumn(),ref.getLastColumn());
DataValidationConstraint constraint = new XSSFDataValidationConstraint(ValidationType.LIST,convertToAbsoluteString(refCRA));
CellRangeAddressList dstAddrList = new CellRangeAddressList(range.getRow(),range.getLastRow(), range.getColumn(), range.getLastColumn());
DataValidation dstDataValidation = helper.createValidation(constraint, dstAddrList);
range.getSheet().addValidationData(dstDataValidation);
}
}