The loop gets executed more than once. Here is the code. When I run the
program, I get the following output. When I look at the generated excel
after I write it to the file, only the 3 row is there!!!

Row number is 0
Row number is 1
Row number is 2

                          int rowNumber = 0;
                while(iterator.hasNext()) {
                        Rule rule = (Rule)iterator.next();
                        
                        HSSFRow dataRow = sheet.createRow(rowNumber);
                        System.out.println("Row number is "  + 
dataRow.getRowNum());
                        
                        
dataRow.createCell(0).setCellValue(rule.getRuleNumber());
                        
dataRow.createCell(1).setCellValue(rule.getRuleDescription());
                        dataRow.createCell(2).setCellValue(rule.getRuleType());
                        
                        rowNumber++;
                }
-- 
View this message in context: 
http://old.nabble.com/Only-single-row-gets-created-in-my-excel-tp26881426p26883701.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to