Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #191, crash on .xlsx written by non-Excel tools with non-standard xml attributes #229

Merged
merged 3 commits into from Jan 19, 2017

Commits on Jan 17, 2017

  1. Braces

    jennybc committed Jan 17, 2017
    Copy the full SHA
    d148a5a View commit details
    Browse the repository at this point in the history
  2. Don't access value of nonexistent numFmtId attribute; fixes #191

    Examples provided privately via email. "crashing" is a workbook written by <http://epplus.codeplex.com/>. "working" is same workbook, opened and re-saved from Excel.
    
    Relevant bits of xl/styles.xml:
    
    crashing:
    
    <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <numFmts count="0"/>
    <fonts count="2">...</fonts>
    <fills count="2">...</fills>
    <borders count="1">...</borders>
    <cellStyleXfs count="1">
    <xf fontId="0"/>
    </cellStyleXfs>
    <cellXfs count="2">
    <xf fontId="0" applyFont="1" xfId="0"/>
    <xf fontId="1" applyFont="1" xfId="0"/>
    </cellXfs>
    <cellStyles count="1">...</cellStyles>
    <dxfs count="0"/>
    </styleSheet>
    
    working:
    <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac">
    <fonts count="2">...</fonts>
    <fills count="2">...</fills>
    <borders count="1">...</borders>
    <cellStyleXfs count="1">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
    </cellStyleXfs>
    <cellXfs count="2">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyFont="1"/>
    <xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/>
    </cellXfs>
    <cellStyles count="1">...</cellStyles>
    <dxfs count="0"/>
    <tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/>
    <extLst>...</extLst>
    </styleSheet>
    jennybc committed Jan 17, 2017
    Copy the full SHA
    3ecca3c View commit details
    Browse the repository at this point in the history
  3. Skip nodes with no numFmtId attribute.

    jennybc committed Jan 17, 2017
    Copy the full SHA
    a1e190d View commit details
    Browse the repository at this point in the history