简体   繁体   中英

Export the imported XML sheet into excel using vba

I am new to vba and I am trying to work on a XML file by importing it into excel,make some changes and export the changed excel sheet to the same xml file again.I was successful in importing the xml in my excel and edit it but not getting how to save the changed sheet again to xml.

I have the path of the xml file in "Path" which I use to import the xml file now i want to export the changed excel sheet to "Path".

A sample VBA code will be a great help.

Make sure you have enabled the developer ribbon in Excel. Select "Source" from the XML section. You should be able to see the map and name associated with the XML in a new frame on the right of the worksheet.

If you want to export either save as XML or simply ...

Sub saveAsXml()
ActiveWorkbook.XmlMaps("my_map").Export URL:="path ..."
End Sub

Hope that helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM