Hallo,
ich versuche mit dem OpenXML 2.5 bzw. 2.10 eine Exceldatei zu erzeugen.
Die Datei wird erstellt und kann auch mit Excel (2013/2016) geöffnet werden, nachdem die Fehler im Stylesheet durch Excel bereinigt (entfernt) wurden.
Ich schau mir jetzt schon seit Stunden den Vergleich im OpenXML Productivity Tool 2.5 an, aber ich sehe nicht, wo der Fehler in Fontsize liegen soll.
Die Fehlermeldung im Anhang.
Liegt das am x-Namespace?
Fehlerhafter Stylesheet (entpackte styles.xml aus der Exceldatei):
XML-Code: |
<?xml version="1.0" encoding="utf-8"?>
<x:styleSheet xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<x:fonts x14ac:knownFonts="1" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<x:font>
<x:name val="Consolas" />
<x:family val="1" />
<x:scheme val="minor" />
<x:sz val="14" />
<x:b />
<x:color rgb="FF000000" />
</x:font>
<x:font>
<x:name val="Consolas" />
<x:family val="1" />
<x:scheme val="minor" />
<x:sz val="10" />
<x:color rgb="FF000000" />
</x:font>
</x:fonts>
<x:fills>
<x:fill>
<x:patternFill patternType="none" />
</x:fill>
</x:fills>
<x:borders>
<x:border />
</x:borders>
<x:cellXfs>
<x:xf fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" />
<x:xf fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" />
</x:cellXfs>
</x:styleSheet>
|
Nach der Reparatur durch Excel (entpackte styles.xml aus der Exceldatei):
XML-Code: |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="x14ac x16r2 xr"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"
xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">
<fonts count="3" x14ac:knownFonts="1">
<font>
<b/>
<sz val="14"/>
<color rgb="FF000000"/>
<name val="Calibri"/>
<family val="1"/>
<scheme val="minor"/>
</font>
<font>
<b/>
<sz val="14"/>
<color rgb="FF000000"/>
<name val="Consolas"/>
<family val="3"/>
</font>
<font>
<sz val="10"/>
<color rgb="FF000000"/>
<name val="Consolas"/>
<family val="3"/>
</font>
</fonts>
<fills count="2">
<fill>
<patternFill patternType="none"/>
</fill>
<fill>
<patternFill patternType="gray125"/>
</fill>
</fills>
<borders count="1">
<border>
<left/>
<right/>
<top/>
<bottom/>
<diagonal/>
</border>
</borders>
<cellStyleXfs count="1">
<xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
</cellStyleXfs>
<cellXfs count="3">
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
<xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/>
<xf numFmtId="0" fontId="2" fillId="0" borderId="0" xfId="0" applyFont="1" applyFill="1" applyBorder="1"/>
</cellXfs>
<cellStyles count="1">
<cellStyle name="Standard" xfId="0" builtinId="0"/>
</cellStyles>
<dxfs count="0"/>
<tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/>
<extLst>
<ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main">
<x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/>
</ext>
<ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">
<x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/>
</ext>
</extLst>
</styleSheet>
|
Hat jemand einen Tip?
Caveman hat dieses Bild (verkleinerte Version) angehängt:

Volle Bildgröße