CoreXLSX
CoreXLSX copied to clipboard
SharedStrings doesn't include/process the XML tags <b/> <I/> <u/> and <strike/> contained in rich text elements <rPr>.
Version
CoreXLSX (0.14.1) -- I'm using this one just because there's a CocoaPod for it.
Description of the bug
Cells in Excel which contain mixtures of font styles -- like italics and bold -- produce sharedStrings XML that include tags to mark the styles. For example, the word Italic within a cell:
<r>
<rPr>
<i/>
<sz val="12"/>
<color theme="1"/>
<rFont val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</rPr>
<t>Italic</t>
</r>
But CoreXLSX does not parse those formatting tags. This makes it impossible for Swift code to differentiate one font style from another within a cell.
Steps to reproduce
- Make an Excel file with one cell filled in with a text like "Bold and Italic."
- Load shared strings
let sharedStrings = try file.parseSharedStrings()
There are no fields defined which handle the those XML tags .
Likewise, Font doesn't include underline.