Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void creaExcelElencoAdcEmail(Iterator<ExportExcel> iter, int righeTotali) throws Exception
- {
- HSSFSheet sheet = wb.getSheetAt(0);
- int rowNum = 2;
- while(iter.hasNext())
- {
- ExportExcel istanza = iter.next();
- HSSFRow row = sheet.createRow(rowNum);
- int i=1;
- row.createCell(i++).setCellValue(istanza.getCodAssociazione());
- row.createCell(i++).setCellValue(istanza.getDescrizione());
- row.createCell(i++).setCellValue(istanza.getEmail());
- rowNum++;
- }
- for(int columnPosition = 1; columnPosition< 6; columnPosition++) {
- sheet.autoSizeColumn((short) (columnPosition));
- }
- wb.write(stream);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement