Only if the cell contains text, if it contains a number or a date for
example, then it is not possible to do this using the API. The key is that
you need to recover a rich text string object from the cell - and the api
will throw an exception if you call the relevenat method on a numeric cell
for example. That object will contain a series of what are referred to as
formatting runs and associated with each will be a font object. That font
object contains information such as name, size, colour, eyc. Currently, on
another thread, we are working toward a solution - there are a couple of
wrinkles to iron out still - that allows us to detect whether the font is
superscripted or not. If you keep an eye on that, the same sort of technique
will allow you to detect colour; but it is important to emphasise that this
will work only for cells that contain a string, or that, more accurately,
have the type Cell.CELL_TYPE_STRING.

Yours

Mark B

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/hssf-and-multiple-colors-per-cell-tp3425176p3455961.html
Sent from the POI - User mailing list archive at Nabble.com.

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

Reply via email to