<html xmlns="http://www.w3.org/1999/xhtml">
    <body>
        <h1>Microsoft Excel 2003 to XML</h1>
        <h2>Converting data to XML</h2>
        <p>You need the 
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_xl2003_ta/html/OfficeExcelXMLToolAddin.asp">additional plugin </a>
for Excel.
<br/>
A copy of the add-in file is available on r:Mannheim. 
</p>
        <p>To install it, go to Tools&gt;Add-ins&gt;&gt;Browse to locate the file and then install. 
 An additional item 'XML tools' should appear on the tool bar.</p>
        <h2>Creating an XML spreadsheet from scratch</h2>
        <ol>
            <li>To create a new spreadsheet, enter the headings first.  Select all columns and set the formatting to text. 
If you don’t you will likely run into problems with dates and times where it is often difficult to wrest control away from Microsoft.</li>
            <li>Enter dates in the XML format yyyy-mm-dd - you can set the date format to this</li>
            <li>Enter the data in the table</li>
            <li>Select the XML tools in the menu bar and 'Convert range to a list'. Guided by the tool, select the required cell range, 
set option for headings and choose advanced to enter your own name for the root of the document and for each row.</li>
            <li>Save the spreadsheet as XML data with an xml extension</li>
            <li>If you need to change the spreadsheet to add or remove columns, 
convert the XML  back to a data list by going to Data&gt;&gt; List &gt;&gt; Convert to range.  Make the changes required and then reconvert back to XML</li>
        </ol>
        <h2>Converting an .xls spreadsheet</h2>
        <p>If the spreadsheet contains dates or times, you may have problems in conversion.  Set the date format to yyyy-mm-dd. When you convert to XML you will be informaed that data formats are incompatible 
- click "use existing formatting"</p>
        <p>As a last resort, export the sheet as tab-delimied text, then re-import, 
ensuring all data is  imported as Text rather than General (which will recognise the dates and set a date type).</p>
        <p>Another approach is to write a Perl script to take a tab-delimited file, in which the first record contains the column headings. 
 Default Document and row tags of  Sheet and Row could be used to generate the XML file directly without using Excel.</p>
    </body>
</html>
