Hi, thank you for quick reply
Sorry I confused giving explanation because I've done with XSSF in that time
I got comma deliminated String but when I do it with HSSF I'm getting
*String literals in formulas can't be bigger than 255 characters ASCII*
for this code:
try {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
HSSFRow row = sheet.createRow((short) 0);
//CellRangeAddressList from org.apache.poi.ss.util package
CellRangeAddressList addressList = new CellRangeAddressList(0, 0, 0, 0);
DVConstraint dvConstraint =
DVConstraint.createExplicitListConstraint(getCountries());
DataValidation dataValidation = new HSSFDataValidation(addressList,
dvConstraint);
dataValidation.setSuppressDropDownArrow(false);
sheet.addValidationData(dataValidation);
FileOutputStream fileOut = new FileOutputStream("c:\\test.xls");
wb.write(fileOut);
fileOut.close();
} catch (IOException e) {
e.printStackTrace();
}
http://stackoverflow.com/questions/8655185/limitation-while-generating-excel-drop-down-list-with-apache-poi
http://stackoverflow.com/questions/8655185/limitation-while-generating-excel-drop-down-list-with-apache-poi
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Problem-creating-an-excel-cell-with-Drop-Down-Lists-tp5151878p5153136.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
|