Exporting XML : Worksheet Export Import « Excel « VBA / Excel / Access / Word






Exporting XML

 
Sub ExportInvoiceXML() 
    Dim xlMap As XmlMap 

    Set xlMap = ThisWorkbook.XmlMaps("Invoice_Map") 
    If xlMap.IsExportable Then 
        xlMap.Export "C:\testxmljunk.xml" 
    Else 
        MsgBox "Sorry, this XML Map is not exportable", vbOKOnly 
    End If 

    Set xlMap = Nothing 
End Sub 

 








Related examples in the same category

1.Importing an XML Data File
2.Adding a Schema to a Workbook