Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

VBA - XML Mappings are not exporting when using VBA code

$
0
0

I am using a macro wrote in VBA to export all my work sheets in my workbook to XML at the same time, but I have created Mappings for the header on the columns but they are not exporting with the sheets. Only if I go to the Developer tag and export to XML does it work.

Is it possible to export all sheets to XML at the same time with the mappings assigned?

Sub Splitziez()

Dim strPath As String
strPath = "C:\Test"
For Each sheetz0r In ThisWorkbook.Sheets
    sheetz0r.Copy
    Application.ActiveWorkbook.SaveAs FileFormat:=xlXMLSpreadsheet, 
Filename:=strPath & "\"& sheetz0r.Name
    Application.ActiveWorkbook.Close False
Next
End Sub

Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>