Other things to avoid

Excel does not support a number of other XML schema constructs when importing XML and a number of schema constructs when exporting XML. These constructs are listed in Tables 15-4 and 15-5, respectively.

Table 15-4. XML schema elements not supported when importing XML

Element

Description

any, anyAttribute

The any and anyAttribute elements allow you to include items that are not declared by the schema. Excel requires imported schemas to be explicit.

Recursive structures

Excel does not support recursive structures that are more than one level deep.

Abstract elements

Abstract elements are meant to be declared in the schema, but never used as elements. Abstract elements depend on other elements being substituted for the abstract element.

Substitution groups

Substitution groups allow an element to be swapped wherever another element is referenced. An element indicates that it’s a member of another element’s substitution group through the substitutionGroup attribute.

Mixed content

Mixed content is declared using mixed="true" on a complex type definition. Excel does not support the simple content of the complex type, but does support the child tags and attributes defined in that complex type.

Table 15-5. XML schema elements not supported when exporting XML

Item

Description

Lists of lists

Excel can export only repeating items that are one level deep. See the section "Avoid lists of lists,” earlier in this chapter.

Denormalized data

See the section ...

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.