Macro insertion Mappage xml dans une feuille

Bonjour à tous, je cherche en vain une macro me permettant d'insérer un Mappage xml en cellule A1 dans mon fichier excel?

Si qq'un à une astuce, je suis preneur.

Merci

Bonjour,

Voir si ce code peut t'aider dans ta recherche.

Cdlt.

Sub ImporterFichierXML()

    Dim XM As XmlMap 
    'Importe le fichier dans la cellule B1 de la Feuil3.
    ThisWorkbook.XmlImport _
        URL:="C:\Nom Fichier.xml", _
        ImportMap:=Nothing, _
        Overwrite:=True, _
        Destination:=Worksheets("Feuil3").Range("$B$1") 
    'Définit le mappage qui vient d'être ajouté.
    'ThisWorkbook.XmlMaps.Count correspond au dernier xml mappé dans le classeur
    Set XM = ThisWorkbook.XmlMaps(ThisWorkbook.XmlMaps.Count) 

    MsgBox "Import terminé" & vbCrLf & _
        XM.RootElementName & vbCrLf & _
        XM.Name & vbCrLf & _
        XM.DataBinding.SourceUrl

End Sub

Merci je teste

Rechercher des sujets similaires à "macro insertion mappage xml feuille"