Hi Guy's and Girls,
I got a problem when generating een OpenXML Excel worksheet. Specially the stylesheet part.
When the stylesheet somehow got a style for a Timeline (excel 2013 only) it is able to generate a excel-file. The stylesheet then contains the right namespace (xmlns:x="..."). This makes it possible to open it in Excel 2010. But when saving the generated excel-file with Excel 2010 the x-namespace becomes the default namespace an is delete from all ellements, except for the timeline extension element. When re-opening the file in excel, this wil result in an error. When opening the same file in the OpenXml Productivity Tool it comes with the error that x is an unknown namespace.
So here's some xml-result code.
Fisrt after generating the excel file (stylesheet.xml):
="1.0"="utf-8"="yes"
<x:styleSheet xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" mc:Ignorable="x14ac">
<x:fonts count="3" x14ac:knownFonts="1">
<x:font>
<x:sz val="11"/>
<x:color theme="1"/>
<x:name val="Calibri"/>
<x:family val="2"/>
<x:scheme val="minor"/>
</x:font>
</x:fonts>
<x:fills count="7">
<x:fill>
<x:patternFill patternType="none"/>
</x:fill>
</x:fills>
<x:borders count="1">
<x:border>
<x:left/>
<x:right/>
<x:top/>
<x:bottom/>
<x:diagonal/>
</x:border>
</x:borders>
<x:cellStyleXfs count="1">
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
</x:cellStyleXfs>
<x:cellXfs count="18">
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
<x:xf numFmtId="14" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" pivotButton="1"/>
<x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1">
<x:alignment horizontal="left"/>
</x:xf>
</x:cellXfs>
<x:cellStyles count="1">
<x:cellStyle name="Standaard" xfId="0" builtinId="0"/>
</x:cellStyles>
<x:dxfs count="1">
<x:dxf>
<x:numFmt numFmtId="19" formatCode="m/d/yyyy"/>
</x:dxf>
</x:dxfs>
<x:tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/>
<x:extLst>
<x:ext xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}">
<x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/>
</x:ext>
<x:ext xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" uri="{9260A510-F301-46a8-8635-F512D64BE5F5}">
<x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/>
</x:ext>
</x:extLst>
</x:styleSheet>
and after saving in Excel 2010
="1.0"="UTF-8"="yes"
<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="3" x14ac:knownFonts="1">
<font>
<sz val="11"/>
<color theme="1"/>
<name val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</font>
<fills count="7">
<fill>
<patternFill patternType="none"/>
</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="18">
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
<xf numFmtId="14" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" pivotButton="1"/>
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1">
<alignment horizontal="left"/>
</xf>
</cellXfs>
<cellStyles count="1">
<cellStyle name="Standaard" xfId="0" builtinId="0"/>
</cellStyles>
<dxfs count="1">
<dxf>
<numFmt numFmtId="164" formatCode="m/d/yyyy"/>
</dxf>
</dxfs>
<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>
<x:ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">
<x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/>
</x:ext>
</extLst>
</styleSheet>
as you can see. The <x:ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" part still contains the x namespace where it is removed from other ellements.
Anyone know how to fix this? My first thought is removing making the x namespace the default namespace so it no longer requieres the x: in the stylesheet at all. But i wasn't able to find an way to tell the openXML SDK to do so.