Betsy Rolland
LIS 600 Independent Study

Transforming XML to Microsoft XML
Terry Brooks
Winter 2006

Create a Hand-Coded Microsoft Excel XML (SpreadsheetML) File that Opens in MS Excel

The instructions below will walk you through creating a simple XML file that opens directly in Microsoft Excel without needing any transformation.

Document:

People_Hand.xml

Steps:

  1. Create a new XML file.

  2. Insert the following header and processing instructions at the top:

    <?xml version="1.0" encoding="UTF-8"?> Regular XML header
    <?mso-application progid="Excel.Sheet"?> Associates the XML document with Microsoft Excel
    <Workbook <!--Defining the Excel Document -->
    xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
    <!-- namespaces for spreadsheet objects and excel objects -->

  3. SpreadsheetML is structured in terms of Worksheet->Table->Row->Cell->Data, as shown in this code snip below. You can have multiple "Worksheets" in one XML file.
  4. Close off all tags, save the page as XML, then open in Excel.