Exporting to an XML File

Similar to the Import method, the Export method allows for the exporting of data from an XML list or range of cells into an XML document. As you can see in the following code, the data is exported to a URL of your choice. Although the URL shown here points to a local location, the export URL can be on a network drive or web server. This method comes in handy when integrating data inputs from various users into a standardized data-gathering exercise:

Sub ExportToXmlFile()

ActiveWorkbook.XmlMaps("EmployeeSales_Map").Export _ URL:=ThisWorkbook.Path & "\Exported.xml" End Sub

0 0

Post a comment