Adding a Schema to a Workbook : Worksheet Export Import « Excel « VBA / Excel / Access / Word






Adding a Schema to a Workbook

 
Sub ImportXMLSchema()
    Dim xmMap As XmlMap
    Application.DisplayAlerts = False
    Set xmMap = ActiveWorkbook.XmlMaps.add("C:\invoice.xml", "Invoice")
    Application.DisplayAlerts = True
    xmMap.AdjustColumnWidth = False
    xmMap.PreserveNumberFormatting = True

    Set xmMap = Nothing
End Sub

 








Related examples in the same category

1.Importing an XML Data File
2.Exporting XML