I've just started using Apache POI, so forgive me if my question is silly.
I want to know how I can read a superscript content present in a cell. For instance, the input excel contains a cell with the following content : "ABC2" , where 2 is given as a superscript.
Now, when I read this cell using getStringCellValue(), I get the content as ABC2 (i.e) as a normal text without the superscript.
Is there anyway to read it as it was given in the input file?
Furthermore, I want to process the superscript in a specific manner. So is it possible to read the normal content and the superscript content separately ?
There should be other methods in the Cell (or HSSFCell) class that return the cell contents in a more structured way, maybe as a CharacterRun or something like that.
I have tried lot of methods but none of them help in processing superscript separetely.
Thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35247
7
posted
0
This topic discusses how to get at the styles of individual characters. It only talks about bold and italic, but the other style attributes are handled in a similar way; check the HSSFFont class for the corresponding method names.
Rohan Ramakumar
Greenhorn
Joined: Mar 08, 2011
Posts: 11
posted
0
I have finally solved it. Thanks for the link Ulf it was really useful.
Thanks
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.