5 Formatting
This part explains in detail how to extract and interpret cell and in-cell formatting. Earlier sections have used formatting, but haven’t explained exactly how it works. The motivating example is a particularly pernicious gotcha: superscript symbols.
The formatting of a cell is available via a lookup table. Well, not a lookup table – a lookup list-of-lists-(of-lists-)of-vectors. It seems complicated, but in fact it is straightforward to find out a cell’s formatting.
- Obtain the vector of formats that you need.
- Look up the cell’s
style_format
orlocal_format_id
in that vector.