Formatting XML for export from Excel

gedkins

New Member
Joined
Sep 30, 2014
Messages
15
Hi,

I am trying to format Excel sheet so that I can export to an XML file. The result I would like looks like the following:

<xml>
<transactions>

<transaction type="import_lists" date ="123459" vaultname ="Type in the name of the vault here">

<!-- Just a list without links -->
<list name ="Materials" >
<item item_name ="Ceramic"/>
<item item_name ="Ferrous Metal"/>
<item item_name ="Nonferrous Metal"/>
<item item_name ="Superalloy"/>
</list>

<!-- A set of linked lists -->
<list name ="Ceramics">
<item item_name ="Boride"/>
<item item_name ="Carbide"/>
<item item_name ="Nitride"/>
<link source_variable ="My Material" list_variable ="Material Type" link_value ="Ceramic"/>
</list>

<list name ="Ferrous Metals">
<item item_name ="Stainless Steel"/>
<item item_name ="Carbon Steel"/>
<item item_name ="Tool Steel"/>
<link source_variable ="My Material" list_variable ="Material Type" link_value ="Ferrous Metal"/>
</list>

<list name ="Nonferrous Metals">
<item item_name ="Aluminium Alloy"/>
<item item_name ="Copper Alloy"/>
<item item_name ="Tin Alloy"/>
<link source_variable ="My Material" list_variable ="Material Type" link_value ="Nonferrous Metal"/>
</list>

<list name ="Superalloys">
<item item_name ="Cobalt Base"/>
<item item_name ="Iron Base"/>
<item item_name ="Nickel base"/>
<link source_variable ="My Material" list_variable ="Material Type" link_value ="Superalloy"/>
</list>

</transaction>

</transactions>
</xml>

I have created an .xsd and added this as a map to the excel spreadsheet and then tried to add new values to the newly created fields after dragging into the sheet the xml map. When I try to export to XML I get the error dialog that states "Cannot save or export XML data. The XML maps in this workbook are not exportable." Seems odd that Excel can create the .XSD file from this map and not export the data. Any help here would be appreciated.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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