0

When there are more elements in the dropdown list in excel it shows error : string literals in formulas can't be bigger than 255 characters ascii

I tried creating a hidden sheet for validation constraints and real sheet for dropdown data still getting the same error.

private static HSSFDataValidation dropdown(int columnIndex, String[] dropdownData) {
    CellRangeAddressList addressList = new CellRangeAddressList(firstRow, lastRow, columnIndex, columnIndex);
    DVConstraint dvConstraint = DVConstraint.createExplicitListConstraint(dropdownData);
    HSSFDataValidation dataValidation = new HSSFDataValidation(addressList, dvConstraint);
    dataValidation.setSuppressDropDownArrow(false);
    return dataValidation;
}

When there is more elements in dropdown list it shows error : string literals in formulas can't be bigger than 255 characters ascii how to make it work using apache poi.

Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52
Arpit Asati
  • 130
  • 2
  • 16

0 Answers0