OLAP connection Open XML adds x: namespace which is preventing slicer to work
I serialise the excel workbook with C# OpenXml to dynamically change the connection.xml file so users can connect to olap cube tabular in pbi.
So I programmatically set a connection string for the user this way.
All was working fine until the user started to insert slicers to the pivot table.
I noticed in the connection.xml the connections xml tag has x: namespace added by OpenXml. eg <x:connection></x:connection>
According to doco
“When the object is serialized out as xml, it’s qualified name is x:connection.”
https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.connection?view=openxml-3.0.1
Once I removed these x: namespace from the connection xml tag slicers worked.
<connections><connection></connection></connections>
Is this a bug in excel ?
Are there plans to fix this?
OpenXml is a lib provided by Microsoft and adds the x: namespace and excel cant handle the namespace,
Reporting this bug and to see when a bug fix will be release for excel to use slicers when you dynamically change the connection string using openxml.
Thanks
I serialise the excel workbook with C# OpenXml to dynamically change the connection.xml file so users can connect to olap cube tabular in pbi.So I programmatically set a connection string for the user this way. All was working fine until the user started to insert slicers to the pivot table. I noticed in the connection.xml the connections xml tag has x: namespace added by OpenXml. eg <x:connection></x:connection>According to doco”When the object is serialized out as xml, it’s qualified name is x:connection.” https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.connection?view=openxml-3.0.1Once I removed these x: namespace from the connection xml tag slicers worked.<connections><connection></connection></connections>Is this a bug in excel ? Are there plans to fix this?OpenXml is a lib provided by Microsoft and adds the x: namespace and excel cant handle the namespace, Reporting this bug and to see when a bug fix will be release for excel to use slicers when you dynamically change the connection string using openxml. Thanks Read More