Hi Pradeepti,
Well, I don't find the problem you have mentioned. Following is my testing code which works fine and attached is the output file.
Sample code:
// Create a workbook object.
Workbook workbook = new Workbook();
// Get the first worksheet.
Worksheet ExcelWorkSheet = workbook.getWorksheets().getSheet(0);
// Add a new worksheet and access it.
Worksheet worksheet2 = workbook.getWorksheets().addSheet();
// Create a range with name in the second worksheet.
NamedRange range = worksheet2.getCells().createNamedRange("MyRange",0,4,10,4);
// Fill different cells with data in the range.
range.getCell(0,0).setValue("Blue asdflasdjf");
range.getCell(1,0).setValue("Red ladjfla aldsfjldf");
range.getCell(2,0).setValue("Green alsdjflasdjf alsdfjl");
range.getCell(3,0).setValue("Yellow lajdflajsdf adslf");
range.getCell(4,0).setValue("Brown ajdflajdljlkads d");
range.getCell(5,0).setValue("LightGreen lajsdlfjdas flkj");
range.getCell(6,0).setValue("LightBlue lajdlfjd adkfj");
range.getCell(7,0).setValue("Pink lajdsljdfkadfj akdsf");
range.getCell(8,0).setValue("ReddishGreen lajdlkfjlk ajdflkjd");
range.getCell(9,0).setValue("Black lajdlkfj aldjflkadjf");
range.getCell(10,0).setValue("LightGrey ljadlfkj lajdflkajd");
//range.getCell(11,0).setValue("Maroon ljadfslkjjadskfjl adjf");
// Obtain the existing Validations collection.
Validations validations = ExcelWorkSheet.getValidations();
// Create a validation object adding to the collection list.
int index = validations.add();
Validation validation = validations.get(index);
// Set the validation type.
validation.setType(ValidationType.LIST);
// Set the in cell drop down.
validation.setInCellDropDown(true);
// Set the formula1.
validation.setFormula1("=MyRange");
// Enable it to show error.
validation.setShowError(true);
// Set the alert type severity level.
validation.setAlertType(ValidationAlertType.STOP);
// Set the error title.
validation.setErrorTitle("Error");
// Set the error message.
validation.setErrorMessage("Please select a color from the list");
// Specify the validation area of cells.
CellArea area = new CellArea(0,0,4,0);
// Add the Validation area.
validation.addCellArea(area);
// Save the excel file.
workbook.save("e:\\files\\1validationtypelist.xls");
And by the way which version of Aspose.Cells for Java you are using? Could you try out latest version / fix i.e.., 1.9.5
If you still find the problem, could you create a test code (with template file if you have) and paste it here to reproduce the issue, we will check it soon.
Thank you.