In order to export data to an XML file, you must add a Map to the workbook, and the map must correspond to your data. Then you can use the Data ^ XML ^ Export command to create an XML file.
Contrary to what you might expect, you can't export an arbitrary range of data in XML format. For example, if you create a List Range on your worksheet, you can't export that List Range to an XML file unless you add an appropriate map to your worksheet first. And it's not possible to create (or modify) a map by using Excel.
Refer to Chapter 27 for an example of a VBA procedure to generate a simple XML file using the data in a range of cells.
If you choose the Excel File ^ Save As command,you'll notice that one of the options is XML Spreadsheet. This produces an XML file that uses the Microsoft XMLSS schema.It will not export the data to a normal XML file that is readable by other applications.
Was this article helpful?