Hi all,
I want to add an HSSFDataValidation to a sheet on my excel workbook. I
found already some code examples where an HSSFDataValidation was created
by a no-arg constructor but this seems to be not possible anymore under
3.2-FINAL.
So instead I used this code:
DVConstraint constraint =
DVConstraint.createExplicitListConstraint(excelListValues);
CellRangeAddressList cellRange = new CellRangeAddressList(
cell.getRowIndex(),
cell.getColumnIndex(),
cell.getRowIndex(),
cell.getColumnIndex() );
HSSFDataValidation dataValidation = new
HSSFDataValidation(cellRange, constraint);
cell.getSheet().addValidationData(dataValidation);
for a given HSSFCell cell.
But when I open the finished XLS there is no list constraint set for the
cell. Did I forget to call some other method to activate the constraint
or something?
Thanks in advance
Best regards
Christian