XML : How do I copy rows in excel with VBA and retain XML mapping?

I am trying to translate data on CSV files to XML.

I have an XML file I created mapped as source to an excel spreadsheet, and doing manual exports has worked fine, however when attempting to copy the initial row of the XML mapping to create another record, the XML mapping is lost, so when I export the workbook, only the first row is translated to XML while the remaining rows are ignored.

enter image description here

Here is the code I am using to copy the initial row in excel:

  Range("A3:AE3").Select  Selection.Copy  Range(xsku & ":" & xsku).Select  Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _      :=False, Transpose:=False  Application.CutCopyMode = False    

Copy and pasting the initial row manually retains the XML mapping, however when I try to record a macro of my actions to view the code, the macro is empty.

If anyone can point me to what I'm missing I would greatly appreciate it.

No comments:

Post a Comment