Macro to export rows as individual xml files with repeating element

silverback24

Board Regular
Joined
Jul 30, 2013
Messages
58
I am putting together a workbook so that our customer service can put all the credit memos into a spreadsheet and have a macro export each row as an individual XML file. The issue I am running into is where we can have from 1 to 12 parts listed in these memos. Does anyone have any pointers for this? I will post the XML.

<sbcpartorderrequest>Nevermind the XML code only posts the data inside of it when I paste it here.

</sbcpartorderrequest><SBCPartOrderRequest>
<TrackingInfo>
<TrackNum>1234567890</TrackNum>
<SupplierName>TESTSELLER</SupplierName>
</TrackingInfo>
<BuyerInfo>
<CustomerID></CustomerID>
</BuyerInfo>
<PONum>1234567890</PONum>
<JobNumber> </JobNumber>
<Items>
<Item>
<ItemID>1</ItemID>
<WarehouseOrder>Y</WarehouseOrder>
<MfgCode>ACD</MfgCode>
<PartNum>PF59</PartNum>
<Qty>1</Qty>
<QtyOrder>1</QtyOrder>
</Item>
<Item>
<ItemID>2</ItemID>
<MfgCode>ACD</MfgCode>
<PartNum>A1519C</PartNum>
<Qty>1</Qty>
<QtyOrder>1</QtyOrder>
</Item>
</Items>
<ShipTo>
<CompanyName>ABC Auto Parts shop-2</CompanyName>
<Street>1234 Anywhere Lane</Street>
<State>IL</State>
</ShipTo>
</SBCPartOrderRequest>
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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