Allocating the elements of an XML map using VBA

keeper85

New Member
Joined
Jun 10, 2011
Messages
15
Hi,

I have columns A to AA filled with data down to row 7 with the headers always being in the first row. What I am trying to do is to load the XML map from an XML file, then assigning each element in the XML maps to a certain column and then exporting that XML file. I want to do all this is all in VBA. I was able to find out what the code is to load in the XML map using the macro recorder:

HTML:
Sub Macro1()
 
    ActiveWorkbook.XmlMaps.Add( _
        "\\vpnlfap00844\udv00844\m05e610\Desktop\xml_pos_sample.xml", "posFile"). _
        Name = "posFile_Map1"
End Sub

However, when I started assigning the elements of the map, the macro recorder did not record anything. Can anyone tell me what kind of code I would need to use to assign the elements of the map to the columns (first element to the first column, second element to the second column, etc, with the headers of the columns and the name of the elements always being the same)? I would really appreciate any kind of help!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top