Microsoft KB Archive/306517

= PRB: BizTalk Editor Error When You Import Excel 2002 XML Worksheet =

Article ID: 306517

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition
 * Microsoft Excel 2002 Standard Edition

-



This article was previously published under Q306517



SYMPTOMS
If you save an Excel 2002 workbook as an Extensible Markup Language (XML) file, when you use the BizTalk Editor to import the workbook, you receive the following error message:

The document being imported uses namespace(s). It will not validate against the imported schema.



CAUSE
When Excel generates an XML document, it creates several namespaces and uses the namespaces throughout the document. However, BizTalk Server does not support multiple namespaces.

Therefore, when the BizTalk Editor imports an Excel XML document, the BizTalk Editor must change the imported data so that it can be used with BizTalk Server. This change is referred to as name mangling. Because some attributes and elements are changed from their original state, the original data instance does not validate against the imported XML file.



RESOLUTION
To validate the original XML file against the schema that is generated during the import, you must modify the original XML file. You must remove all of the namespaces and any prefixes for all attributes and elements in the XML document.

To modify the original Excel XML document so that it can validate against the imported schema, follow these steps:   Excel defines the following namespaces in the WorkBook root element: xmlns=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; Remove all of these namespaces except for the following namespace: xmlns=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot;  Remove any references to any of these namespaces. If any of these namespaces prefix any attributes or elements, remove the prefixes. For example, remove the x: from the x:FullColumns attribute. Save your changes to the Excel XML file. From the Tools menu, click Validate Instance to validate the modified data instance against the newly imported schema.

NOTE: BizTalk may replace some of the prefixes with underscore characters (_). When you try to validate in the BizTalk Editor, if you receive the following error message (or similar):

The XML document has failed validation for the following reason:

The attribute 'FullColumns' on this element is not defined in the DTD/Schema. Line:34, Position:17

FullRows=&quot;1&quot;>

you must review the schema to determine the correct name for the attribute. In this case, you must change FullColumns to x_FullColumns in the original Excel XML file.

If multiple, similar errors occur, use the same procedure for all of the attributes or elements that these error messages list.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
Excel uses the SS and X namespaces. After you review the raw XML of the Excel document, you may notice that some attributes or elements are prefixed with these namespaces. When you import such a file, you must either remove the prefix or replace the colon with an underscore character (_). For example, you must replace x:FullColumns in the original XML file with x_FullColumns in the imported schema.

Additional query words: alter

Keywords: kbprb KB306517

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.