Bug 6830 - Solid fill pattern doesn't allow for colors
Summary: Solid fill pattern doesn't allow for colors
Status: CLOSED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-04 01:29 UTC by william.barker
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description william.barker 2002-03-04 01:29:24 UTC
This is using the current CVS HEAD.

When I specify:
	HSSFCellStyle  col1 = wb.createCellStyle();
	col1.setFillPattern(HSSFCellStyle.SOLID_FILL);
	col1.setFillBackgroundColor(HSSFCellStyle.PALE_BLUE);

All of the cells show up with a black background in Excel (2000).  I get the 
same results using other colors, and all of the other FillPattern constants 
work fine.
Comment 1 Andy Oliver 2002-03-04 01:51:36 UTC
Think about it.  You're filling it solid...  with the FOREGROUND color.  So set
the foreground color to blue instead of the background color.  I made the same
mistake initially and thought it was just Excel being weird...now I get it.
Comment 2 william.barker 2002-03-04 02:05:33 UTC
Works.  Thanks much, and keep up the good work!
Comment 3 Andy Oliver 2002-03-04 03:00:44 UTC
this should probably be in a faq...it triped me up too.