We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell.GetCharacters() in case where cell is formatted uniformly

I'm using Cell.GetCharacters() to read rich-text formatting from Excel cells. I've discovered a limitation, which is that the Cell.GetCharacters() returns null if the entire cell contains a uniform formatting (for example, the text is all bold, red). I know that I can get the formatting information in this case from the Cell, but that requires coding separately for this special case - all other cases use logic that reads the ArrayList returned by Cell.GetCharacters().

Is it possible for you to modify GetCharacters() so that it returns an ArrayList with only one item, a Characters object, in the case of uniform cell formatting?

Thanks!

Hi,

Thanks for pointing it out.

We found the issue, we will figure it out soon.

Thank you.

Hi,

Well, for your info, if a cell is formatted uniformly, the Cell.GetCharacters() will return null.

Could you check whether it's null before iterating list.

Thank you.

That is indeed what I am doing currently - checking for null value, then if it's null looking at cell level formatting instead of GetCharacters() type fomratting. But I would prefer to be able to use a consistent approach for all cells - there's need not be anything fundamentally different in a cell that has one format applied to all the characters within it versus one that has multiple formats, and having to code for a special case seems clumsy, and requires extra code.

Thanks for your time and aid.

Hi,

Ok, we have to find some more time to further analyze it if we can enhance it more. You know we got a very busy schedule performing other important tasks on hand these days.

Thank you.

Ok. Thanks.