I have encountered an issue where, if a cell has boolean values in drop down,
cell.getValidationValue() returns false, even though the value is correct.
The file I am using is Book1.zip (6.6 KB)
The code I am using is as follows:
Worksheet sheet = wb.getWorksheets().get(0); Cells cells = sheet.getCells(); Cell d4 = cells.get("D4"); if (d4.getValidationValue()) System.out.println("d4 is valid"); else System.out.println("d4 is not valid"); Cell d6 = cells.get("D6"); if (d6.getValidationValue()) System.out.println("d6 is valid"); else System.out.println("d6 is not valid");
The excepted output is
d4 is valid d6 is valid
But the actual output is
d4 is not valid d6 is valid
Note : If there is a blank value selected in the dropdown, the output is as expected.
Thanks in advance!