Quantcast
Channel: Silk Test - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 625

How to set Excel Background/foreground color using Silk4J?

$
0
0

Hi,

I am using Silk 4J and for reporting trying to set Excel Background/foreground color, based on the result. I tried the below code but unable to set color. Could someone please help me with this?

XSSFCellStyle style = (XSSFCellStyle) workbook.createCellStyle();

style=(XSSFCellStyle) workbook.createCellStyle();

XSSFColor color=new XSSFColor(new java.awt.Color(0, 73,144));

style.setFillBackgroundColor(color);

style.setFillPattern(FillPatternType.SOLID_FOREGROUND);

reportRow.createCell(2).setCellStyle(style);

 

-Alice


Viewing all articles
Browse latest Browse all 625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>