CoreXLSX icon indicating copy to clipboard operation
CoreXLSX copied to clipboard

SharedStrings doesn't include/process the XML tags <b/> <I/> <u/> and <strike/> contained in rich text elements <rPr>.

Open mikado2005 opened this issue 1 year ago • 1 comments

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

  1. Make an Excel file with one cell filled in with a text like "Bold and Italic."
  2. Load shared strings let sharedStrings = try file.parseSharedStrings()

There are no fields defined which handle the those XML tags .

mikado2005 avatar Feb 09 '24 19:02 mikado2005

Likewise, Font doesn't include underline.

mikado2005 avatar Feb 09 '24 23:02 mikado2005