poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DRINKARD, JAMES E (SBCSI)" <jd4...@sbc.com>
Subject Applying multiple cell styles
Date Wed, 12 Mar 2003 15:21:12 GMT
Hello All,
I'm having a problem applying a background color to cells and applying
multiple styles to the same cell ie font, bold and background color. I'm
using version POI 1.5.0
The code is:
		//style0 bold font.
             HSSFFont font = wb.createFont();
             HSSFCellStyle style0 = wb.createCellStyle();

              //style1 bright green background color.
             HSSFCellStyle style1 = wb.createCellStyle();
             //style2 bright grey background color.
             HSSFCellStyle style2 = wb.createCellStyle();
My font style code works, but the colors dont' show up. I also don't know
how to combine cell styles for the same cells and get that to compile.

The syntax in the How To guide shows this code below, but it won't compile,
even though I import the util jar where the classes are located? Any ideas??

View raw message