https://bz.apache.org/bugzilla/show_bug.cgi?id=60902

--- Comment #9 from Nick Burch <[email protected]> ---
(In reply to Mark Murphy from comment #8)
> setCellStyleProperties() doesn't copy anything. You have to put the
> properties you want in the map. that can include fonts if you choose. It
> does not handle colors other than indexed colors though, but that is due to
> the fact that HSSF only supports indexed colors, and
> CellUtil.setCellStyleProperties is part of the converged interface.

There's Common SS support for XSSF-style colours though - they're used in both
XSSF and in some newer bits of HSSF like newer Conditional Formatting. The
class you'd want to use is ExtendedColor - 
https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/ExtendedColor.html

Not sure if you could easily write totally generic code though, eg what happens
if you give a custom red colour to HSSF? Error? Do what Excel does and down-mix
to the nearest colour that XLS knows about?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to