help exporting XML data. XSD schema help?

virtum

New Member
Joined
Nov 15, 2005
Messages
6
I have a data set in excel, that I'm attempting to export as XML. I can not seem to get the XSD schema file correct to allow me to export the data. I keep getting the error "Cannot save or export XML data. The XML maps in this workbook are not exportable."

The data is a simple table on one worksheet in excel a few hundred rows long. I know how to add the Map to my excel file, and how to map the elements, but I think I've written the XSD incorrectly.

This is the sample XML I'm trying to create (with many games):
HTML:
<games>
  <game>
    <date>2010-06-01</date>
    <time>13:00:00</time>
    <field>field ID </field>
    <home> Home ID </home>
    <away> Away ID </away>
    <division> division </division>
    <game_type> L/NL/Bye </game_type>
    <tournament> 0/1 </tournament>
  </game>
...
...
</games>

This is the XSD Schema I've written:
HTML:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:annotation>
    	<xsd:documentation xml:lang="en">
    	 Schedule schema for MSL Schedule 2010 rev 1
    	</xsd:documentation>
  	</xsd:annotation>

	
	<xsd:element name="Games">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:element name="Game" minOccurs="0" maxOccurs="unbounded">
				<xsd:complexType>
				<xsd:sequence>
					<xsd:element name="date" type="xsd:date"/>
					<xsd:element name="time" type="xsd:time"/>
					<xsd:element name="field" type="xsd:string"/>
					<xsd:element name="home" type="xsd:string"/>
					<xsd:element name="away" type="xsd:string"/>
					<xsd:element name="division" type="xsd:string"/>
					<xsd:element name="game_type" type="xsd:string"/>
					<xsd:element name="tournament" type="xsd:string"/>
				</xsd:sequence>
				</xsd:complexType>	
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	</xsd:element>

</xsd:schema>
Grateful for any advice that can be given. I'm an excel whiz, but an XML novice. :) Thanks in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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