xfId mapping broken in cellXfs
Created originally on Bitbucket by CharlieC
From #642 (closed) cellXfs[48] seems to index a non-extant base style. This is carried over from the original file but openpyxl normalises and rebases the pointers.
#!xml
<x:xf numFmtId="165" fontId="13" fillId="3" borderId="30" xfId="19" quotePrefix="0" pivotButton="0" applyAlignment="1" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<x:alignment horizontal="center" vertical="center" wrapText="1" />
</x:xf>
Relevant record from source (from LibreOffice)
#!xml
<cellStyles count="6">
<cellStyle name="Normal" xfId="0" builtinId="0" customBuiltin="false"/>
<cellStyle name="Comma" xfId="15" builtinId="3" customBuiltin="false"/>
<cellStyle name="Comma [0]" xfId="16" builtinId="6" customBuiltin="false"/>
<cellStyle name="Currency" xfId="17" builtinId="4" customBuiltin="false"/>
<cellStyle name="Currency [0]" xfId="18" builtinId="7" customBuiltin="false"/>
<cellStyle name="Percent" xfId="19" builtinId="5" customBuiltin="false"/>
</cellStyles>
And what openpyxl makes of it
#!xml
<cellStyles count="6">
<cellStyle name="Normal" xfId="0" builtinId="0"/>
<cellStyle name="Comma" xfId="1" builtinId="3"/>
<cellStyle name="Comma [0]" xfId="2" builtinId="6"/>
<cellStyle name="Currency" xfId="3" builtinId="4"/>
<cellStyle name="Currency [0]" xfId="4" builtinId="7"/>
<cellStyle name="Percent" xfId="5" builtinId="5"/>
</cellStyles>