aspose file tools*
The moose likes Other Open Source Projects and the fly likes facing diffculty to highlight background color of an excel cell which is not reflected in file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "facing diffculty to highlight background color of an excel cell which is not reflected in file " Watch "facing diffculty to highlight background color of an excel cell which is not reflected in file " New topic
Author

facing diffculty to highlight background color of an excel cell which is not reflected in file

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
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();

here is my code please can any one give inputs which correctly reflects background color for a cell of an excel or code do it
 
Don't get me started about those stupid light bulbs.
 
subject: facing diffculty to highlight background color of an excel cell which is not reflected in file
 
Similar Threads
root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document
opening the excel sheet from servlet
Set character formatting in Excel using POI
How to make POI HSSF support Chinese Encoding?
Generate Excel report in java