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.

6
  • 3
    Does it work in Excel? Commented Jul 18, 2019 at 7:51
  • There is dropdown data for each of the column using list means I am passing the list for each of the column to make it dropdown. Commented Jul 18, 2019 at 7:52
  • @joakim yes it does work (when create dropdown manually) but using java poi it shows error when there is more data dropdown list. Commented Jul 18, 2019 at 7:53
  • I am facing this issue from last 1 week. Commented Jul 18, 2019 at 7:55
  • See stackoverflow.com/questions/8655185/…. This is not a apache poi limitation but a Excel limitation. The solution is using a cell range as list source rather than a string literal. Commented Jul 19, 2019 at 3:52

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.