+ Reply to Thread
Results 1 to 2 of 2

Export XML using XSD

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Export XML using XSD

    Hi all,

    I like to export XML-data from an Excel-sheet. For this I use an XSD-schema wich is imported into my sheet as an XML-mapping.
    The export works so far but I've got two problems.
    First is:
    How do I connect an XSD-attribute to a complete column. I'm only able to attach one single value. The result is, that the exported XML contains only one dataset.

    Second problem:
    I need some fixed values in the XML wich are not stored in the Excel-sheet. To get them into the XML I tried to define some constants in my XSD.
    Needed output ist:
    Please Login or Register  to view this content.
    example XSD:
    Please Login or Register  to view this content.
    I'm not sure if the XSD is correct or if Excel has a problem with fix attributes. Anyway Excel forces me to attach a value to all attributes from the XSD. Otherwise it declines the export.

    Thanks in andvance,
    Kuesel

  2. #2
    Registered User
    Join Date
    03-15-2013
    Location
    Northampton, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Export XML using XSD

    Hi Kuesel

    Try the following (You may need to change the encoding and name space).

    When you link the schema make sure you link to the "Task Tabel"

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Task Tabel">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ItemRow" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="Task">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="hours" type="xs:integer" fixed = "0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hope this helps!

    The Bidds

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1