setFillForeground to an XSSFColor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

setFillForeground to an XSSFColor

Huw Coxon

I'm having real problems setting the color of the Fill foreground for a cell using Apache POI commons
code. I was under the impression from the javadoc that this method was available:

void setFillForegroundColor(short fg)
Set the foreground fill color as a indexed color value

Note: Ensure Foreground color is set prior to background color.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: setFillForeground to an XSSFColor

Dominik Stadler
Hi,

please try to set the fill pattern via

style.setFillPattern(FillPatternType.SOLID_FOREGROUND);

See also
http://poi.apache.org/components/spreadsheet/quick-guide.html#FillsAndFrills

Thanks... Dominik.


On Mon, Feb 24, 2020 at 6:27 PM Huw Coxon <[hidden email]> wrote:

>
> I'm having real problems setting the color of the Fill foreground for a
> cell using Apache POI commons
> code. I was under the impression from the javadoc that this method was
> available:
>
> void    setFillForegroundColor(short fg)
> Set the foreground fill color as a indexed color value
>
> Note: Ensure Foreground color is set prior to background color.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>