Thanks, it works. Thanks Jack Calderone too for your answer. Regards Ev Jordan ha escrito:
> David, > > I also had some significant confusion on this point, and > I think it stems from the use of Foreground and Background > terminology in the POI api. When I was trying to get this > to work, I tried a number of call permutations, including > the one you mentioned below. > > Anyway, If I understand what you are asking, you want to have > black text appear "in front" of a background color that fills > an entire cell. So, the way this is done is to set the > "Foreground" fill color, and specify a Fill Pattern of > SOLID_FOREGROUND. > > The following sequence is the one I think you want... > > HSSFCellStyle cs = wb.createCellStyle(); > cs.setFillForegroundColor(HSSFColor.LAVENDER.index); > cs.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); > > Regards > > -----Original Message----- > From: David Teruel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 25, 2004 10:20 AM > To: POI Users List > Subject: Cell background color > > Hi All. > I'm trying to put a background color to a excel cells. I'm using this > code: > > sty_cabecera.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); > sty_cabecera.setFillBackgroundColor(HSSFColor.LAVENDER.index); > > But this puts a black foreground color that blinds the text. > What am I doing wrong?. > How can I put a Lavender background color over Black text to a excel > cell? > > Thx. > Best regards. > > -- > ************************************************** > David Teruel Vioque > GFI-Inform�tica. Telef�nica I+D > Tfl: 91.312.99.85 (29985) > email: [EMAIL PROTECTED] > [EMAIL PROTECTED] > ************************************************** > Ojal� que se acabe la mirada constante, la palabra > precisa la sonrisa perfecta ... Silvio Rodr�guez. > ************************************************** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ************************************************** David Teruel Vioque GFI-Inform�tica. Telef�nica I+D Tfl: 91.312.99.85 (29985) email: [EMAIL PROTECTED] [EMAIL PROTECTED] ************************************************** Ojal� que se acabe la mirada constante, la palabra precisa la sonrisa perfecta ... Silvio Rodr�guez. ************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
