Problems using XML in Excel 2003

E

elect_son

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!
 
J

Jan Karel Pieterse

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
 
E

elect_son

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top