Dropdown List problem in ExcelSheet Generation

Hi,

I'm adding dropdowns in ExcelSheet usingjxl API. I'm getting problems when values in one dropdown are more than 25. See some sample code below,

publicvoid createTemplate(ListBean listBean,int rowCount, String templatePath)throws Exception{

WorkbookSettings ws =new WorkbookSettings();

ws.setLocale(new Locale("en","EN"));

Workbook workbook1 = Workbook.getWorkbook(new File(templatePath+"\\baseTemplate.xls"));

workbook = Workbook.createWorkbook(new File(templatePath+"\\finalTemplate.xls"), workbook1);

WritableSheet s1 = workbook.getSheet(1);

createRequiredRows(s1,listBean,rowCount);

workbook.setColourRGB(Colour.BLACK, 0xfff, 22, 22);

workbook.write();

workbook.close();

}

publicvoid createRequiredRows(WritableSheet s, ListBean listBean,int rowCount)throws WriteException{

if(rowCount== -1){

rowCount = 1000;

}

int startRowNo = 8;

String rowLabel ="Strain ";

int strainCount = 1;

for (int rowNo = startRowNo ; rowNo < startRowNo+rowCount ; rowNo++){

Label strainLabel =new Label(0,rowNo,rowLabel+strainCount);

s.addCell(strainLabel);

WritableCellFeatures wc0 =new WritableCellFeatures();

wc0.setDataValidationList(listBean.getProduces());

Blank produces =new Blank(4,rowNo);

produces.setCellFeatures(wc0);

s.addCell(produces);

WritableCellFeatures wc1 =new WritableCellFeatures();

wc1.setDataValidationList(listBean.getGenus());

Blank genus =new Blank(6,rowNo);

genus.setCellFeatures(wc1);

s.addCell(genus);

.....................................

......................................

strainCount++;

}

In the above sample code i'm addding list of values returned by this ,listBean.getProduces() tosetDataValidationList(). List values are not adding to drop down if these values are more than 25.

Please give answer to this one that ,

Is there any limitation to add values to dropdownlist ?

If not how to overcome this problem ?

Thanks,

-Anil.

[3200 byte] By [manil22@gmail.coma] at [2007-11-27 3:56:57]
# 1
hmmm, jxl is supporting dropdown lists... This is nice, next time I won't use jakarta POI.As far as I remember, POI has buffer size limitation for each cell. Maybe here the problem is similar?RegardsMarecki
marecki6000a at 2007-7-12 9:01:14 > top of Java-index,Core,Core APIs...
# 2
http://forum.java.sun.com/ann.jspa?annID=14
ejpa at 2007-7-12 9:01:14 > top of Java-index,Core,Core APIs...