I tried using RichTextString
to get individual character’s font, but it works fine only for a cell with at least one different style is applied. In the case of the same style applied throughout the cell:
font1 = workbook.getFontAt(richString.getFontAtIndex(i))
here, the richString.getFontAtIndex(i)
returns 0, and thus the entire font object becomes null.
2
Answers
the following code works fine for the cell with least one different style is applied. In case of the cell with the same style, the richString object return 0 which produces "null" font object