This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes APACHE POI - Not able to give background colour to a cell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "APACHE POI - Not able to give background colour to a cell" Watch "APACHE POI - Not able to give background colour to a cell" New topic
Author

APACHE POI - Not able to give background colour to a cell

rammie singh
Ranch Hand

Joined: Mar 26, 2009
Posts: 116
HI,

i m trying a piece of code to give background colour to a cell by using POI. But result is not getting reflected..meaning the bckground color is not produced.

Can any body please help me ..or tell me, where i am going wrong.

my piece of code is below

rammie singh
Ranch Hand

Joined: Mar 26, 2009
Posts: 116
Can anybody guide on this ..Please help.
Mark Ryan
Greenhorn

Joined: Sep 27, 2011
Posts: 1
My code below should help...............

Pradeep Kuppusamy
Greenhorn

Joined: Jan 02, 2012
Posts: 1
If you still want to use HSSFCellStyle, then use setFillForeGroundColor(); That will do. Though I dont understand why they have BackGround fill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: APACHE POI - Not able to give background colour to a cell
 
Similar Threads
how to store a file in the local hard disk
Writing on excel file using POI
How do i format a string to date
How can I analize Excel file with Apache POI?
facing diffculty to highlight background color of an excel cell which is not reflected in file