Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Report post to moderator

posted Yesterday 8:41:21 PM
iam unable to fill background color for an excel cell

HSSFWorkbook hwb = new HSSFWorkbook();
HSSFSheet sheet = hwb.createSheet("new sheet");
HSSFCellStyle style = hwb.createCellStyle();


HSSFRow row = sheet.createRow((short) 0);

HSSFCell cell = row.createCell((short) 0);
cell.setCellValue(1);

style.setFillBackgroundColor(HSSFColor.RED.index);
style.setFillPattern(HSSFCellStyle.BIG_SPOTS);


cell.setCellStyle(style);


FileOutputStream fileOut = new FileOutputStream("C:\\fillsColor.xls");
hwb.write(fileOut);
fileOut.close();


i want to know the root c ause of problem why it is not reflecting
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please stop posting the same question; thanks!
    Bookmark Topic Watch Topic
  • New Topic