I am trying to generate an Excel-compatible XML file from Mathematica. First, I created a test XML file by saving a Microsoft Excel workbook
as "XML Table". Then I Imported this file:
XMLdata = Import["test.xml", "IncludeNamespaces" -> True]
Now I am Exporting this back to XML:
Export["test_exported.xml", XMLdata, "AttributeQuoting" -> "\""]
The generated file cannot be opened by Excel. Comparing it with the
original file shows that most of namespace prefixes are dropped although
they were present in XMLdata. Why does this happen? How can I correctly Export an XML file which will be compatible with Excel?


Importline. I can import it as text and then importing that usingImportString. – Sjoerd C. de Vries Jul 3 '12 at 19:57