Beyer, Daniel (SL1 D) wrote:
> thx, but i wrote the following and it doesn´t seem to work:
>                       
> HSSFCellStyle captionStyle = workBook.createCellStyle();
> captionStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);

The next line is not needed

> captionStyle.setFillBackgroundColor(HSSFColor.RED.index);

This should be:
captionStyle.setFillForegroundColor(HSSFColor.RED.index);
> captionStyle.setFillForegroundColor(HSSFColor.BLACK.index); 
> captionStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
> HSSFRow row = sheet.createRow((short) 0);
>               

Where do you assing the style to the cell?

> createExcelCaption(captionStyle, row, "DATUM", (short) 0);
> createExcelCaption(captionStyle, row, "PERFORMANCE", (short) 1);
> createExcelCaption(captionStyle, row, "VARIANTE", (short) 2);
> 
> Daniel
> 

Tom

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to