HSSFRichTextString str =
workbook.getSheetAt(1).getRow(3).getCell(0).getRichStringCellValue();
for(int i = 0; i < str.numFormattingRuns(); i++){
short fontIndex = str.getFontOfFormattingRun(i);
HSSFFont font = wb.getFontAt(fontIndex);
int colorIndex = font.getColor();
HSSFColor color = HSSFColor.getIndexHash().get(colorIndex);
System.out.println(color);
}
Regards,
Yegor
On Fri, Mar 11, 2011 at 5:22 PM, Jaroslav Lunda
<[email protected]> wrote:
> Hi, if one has cell with some multicolored text (each word different color) -
> it is possible to obtain all of these colors using hssf?
> It seems to me that only one color can be obtained per font, one font per
> style and one style per cell.
> Is there any other way to do this?
>
> ---------------------------------------------------------------------
> 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]