There is no reliable API for multiple styles within a cell. It relies on the sharedStrings.xml which is officially optional.
Ah ok. What do you mean by 'officially optional'? Sorry, I'm not very familiar with the standard.
See section 18.4 of the specification.
"The goal of implementing a single string table that is shared across the workbook is to improve performance in opening and saving the file by only reading and writing the repetitive information once."
There are problems with this - not least there is no enforcement for unique values - using the same object for sub-cell formatting makes an additional mockery of the whole thing. You can see this if you look at the source of your file.
We're currently considering dropping its use entirely as it can be quite a bottleneck.
I understand the burden! Thanks!
Is this basically because Excel just does things its own way?
Sort of. In certain places the specification looks rushed and not very well thought through and sometimes this is probably just to do just enough to replicate current behaviour. It's one of the reasons why it's so difficult why so few programs or libraries pretend to provide 100% functionality. It would be possible to read and write such information by essentially embedding the formatting information in the string but I'm not sure how that would be modelled in Python, ie. what you'd get when looking at the value of such a cell. And providing that kind of support would also place a large burden of knowledge with client code: if we were to preserve it you'd have to parse both the formatting information and value yourself.