I have a spreadsheet that I want to map to a schema then export as XML. I do
not need to import any XML data into the spreadsheet; only export.
I've mapped all the required elements of the schema to cells but when I got
to export ("Save As" XML Data) I get the following errors:
- denormalized data
- a mapped element's relationship with other elements cannot be preserved
- required elements not mapped
I don't fully understand the first two errors and the third one is a mystery
as I have mapped all the required elements.
First, is this a legitimate use of the XML functionality? All the
documentation makes it sound like you are suppose to import your data from
XML but it shouldn't matter if you just type it in.
Any clues about the first two errors?
Thanks!
Hi Elect,
> I've mapped all the required elements of the schema to cells but when I got
> to export ("Save As" XML Data) I get the following errors:
>
> - denormalized data
You cannot export to XML when you have an element that is repeated over and
over nested below another element. E.g. Excel cannot export this kind of XML:
<company name="ACME"
<employee name="Johnson">
</employee>
<employee name="Jackson">
</employee>
<employee name="Roberts">
</employee>
<employee name="Jacobs">
</employee>
</company>
Which is represented in Excel as:
company employee
ACME Johnson
ACME Jackson
ACME Roberts
ACME Jacobs
Not sure about the other errors, but thisone alone will prevent the export.
Regards,
Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
elect_son - 31 May 2007 15:31 GMT
Hi Jan,
Would the case you brought up include a structure like this:
<xs:element name="master_document">
<xs:complexType>
<xs:sequence>
<xs:element ref="full_title"/>
<xs:element ref="authors"/>
<xs:element ref="cmg_name"/>
<xs:element ref="creation_date"/>
<xs:element ref="disclosure_level"/>
<xs:element ref="language_code"/>
<xs:element ref="publication_priority"/>
<xs:element ref="short_title"/>
<xs:element ref="original_docid"/>
<xs:element ref="original_system"/>
<xs:element ref="delivery_destinations"/>
<xs:element ref="input_filename"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="full_title" type="xs:string"/>
<xs:element name="authors">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="author"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Note how "authors" is a sequence of multiple "author" nodes. I'm wondering
if the "author" node falls into the category of error you are describing?
Thanks!
Bob
> Hi Elect,
>
[quoted text clipped - 35 lines]
> Professional Office Developer Association
> www.proofficedev.com
Jan Karel Pieterse - 31 May 2007 20:43 GMT
Hi Elect,
> Note how "authors" is a sequence of multiple "author" nodes. I'm wondering
> if the "author" node falls into the category of error you are describing?
I think so, yes.
Regards,
Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
elect_son - 31 May 2007 20:53 GMT
Thank you very much for your help Jan!
> Hi Elect,
>
[quoted text clipped - 11 lines]
> Professional Office Developer Association
> www.proofficedev.com