File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply locked New topic
Author

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

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 72

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

Joined: Sep 29, 2008
Posts: 12617

Please stop posting the same question; thanks!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document
 
Similar Threads
facing diffculty to highlight background color of an excel cell which is not reflected in file
Write character to excel using POI
How to make POI HSSF support Chinese Encoding?
setShrinkToFit using POI
Writing on excel file using POI