myCellStyle.setFont(myFont);
myCell.setCellStyle(myCellStyle);
}
public void createYearSumRows(int k){
HSSFCellStyle emptyLeftCellStyle = myWorkBook.createCellStyle();
emptyLeftCellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
HSSFCellStyle emptyRightCellStyle = myWorkBook.createCellStyle();
emptyRightCellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
HSSFCellStyle emptyCellStyle = myWorkBook.createCellStyle();
cra = new CellRangeAddress(mySheet.getLastRowNum()+1, mySheet.getLastRowNum()+1, 0, 7);
mySheet.addMergedRegion( cra );
myFont = myWorkBook.createFont();
myFont.setFontHeight((short) 240);
myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
myCell = myRow.createCell(0);
myCell.setCellValue("Summe "+jahrList.get(k).getJahr());
myCellStyle = myWorkBook.createCellStyle();
myCellStyle.setFillForegroundColor(HSSFColor.BLUE_GREY.index);
myCellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
myCellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setFont(myFont);
myCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
myCell.setCellStyle(myCellStyle);
for(int i = 1; i < 7; i++){
myCell = myRow.createCell(i);
myCellStyle = myWorkBook.createCellStyle();
myCellStyle.setFillForegroundColor(HSSFColor.BLUE_GREY.index);
myCellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
myCellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
myCell.setCellStyle(myCellStyle);
}
myCell = myRow.createCell(7);
myCellStyle = myWorkBook.createCellStyle();
myCellStyle.setFillForegroundColor(HSSFColor.BLUE_GREY.index);
myCellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
myCellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
myCellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
myCell.setCellStyle(myCellStyle);
myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
HSSFFont myFont = myWorkBook.createFont();
myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
gesSumEuroCellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);
gesSumEuroCellStyle.setBorderTop(HSSFCellStyle.BORDER_THICK);
gesSumEuroCellStyle.setFont(myFont);
myCell = myRow.createCell(0);
myCell.setCellValue("Jahressumme "+jahrList.get(k).getJahr());
myCellStyle = myWorkBook.createCellStyle();
myCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);