In your cell the style of the footnote text overrides the cell style.
To get formatting of individual characters you need to iterate over
rich text:
HSSFRichTextString rt = cell.getRichStringCellValue();
String text = rt.getString(); for(int i = 0; i <
text.length(); i++){ char c = text.charAt(i);
short fontIndex = rt.getFontAtIndex(i); HSSFFont font =
workbook.getFontAt(fontIndex); }
Yegor
On Fri, Feb 10, 2012 at 5:56 PM, Becky Cartine <[email protected]> wrote:
> Is there a way to determine font style and other text formatting at the
> character level within a given Cell? For example, if part of the text in a
> Cell is bold.
>
> This is how I get the Font for a Cell:
>
> short fontIndex = cellStyle.getFontIndex();
> Font font = workbook.getFontAt(fontIndex);
>
> In the Excel workbook I am working with, the text in the Cell has a trailing
> footnote symbol in superscript, however font.getTypeOffSet() returns a value
> of 0.
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]