Ah, are you saying then that you have cells that contain only superscripted text? The reason I ask is that my testing does not agree with your conclusion. One of the tests I ran was with your original example of ABC2 (where the number 2 was superscripted) and the code reported that it had found two formatting runs in the cell. So far, the only problems I have encountered have been where the entire contents of the cell have been numeric and superscripted as that simply reports a numeric cell - which I am unable to get a RichTextString from. In these cases, the approach needs to be different - get the formatting object for the cell, the font from that and check to see if that is superscripted. However in every case where ther has been a mixture of 'normal' and superscripted text, the code has worked.
Have you tried simply removing the check on the number of formatting runs and seeing what effect this has on the code? For my test file, it simply means that all text cells are processed. Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Reading-superscript-from-data-cell-tp3414964p3423659.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]
