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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.