Microsoft Knowledge Base Email Alertz

(840475) - Describes the XSD data types are supported in Excel 2003 and the resulting display format. This article also lists unsupported data types.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 840475 - Last Review: June 2, 2004 - Revision: 1.3

How formatting is applied to imported XML data in Excel 2003

INTRODUCTION

This article describes how formatting is applied to imported XML data in Microsoft Office Excel 2003.

MORE INFORMATION

When you import XML data into cells that have formatting, Excel 2003 compares the cell formatting to the XML Schema Definition (XSD) data type. If the formatting is compatible, the data is imported and the cell formatting is not changed. For example, the existing cell format is a number that has two decimal places, and you import an element that has a data type of long. If the data type is not compatible, you receive a warning dialog box that prompts you to select one of the following actions:
  • Use existing formatting - ignore the XSD data type.
  • Match element data type - change the cell formatting to the appropriate type.
  • Cancel - do not import the XML data.
When you import XML data into cells that do not have formatting or when you choose to change the formatting to match the data type, Excel 2003 applies a display format that is based on the XML XSD data type. For example, when you import a DateTime date type, the cell format changes to a date format. Some data is imported, and then a general format is applied to the cells.

The following table lists supported and unsupported XSD data types. Data with an XSD format listed in the Unsupported Formats column is imported as text values.

Collapse this tableExpand this table
Supported XSD data typeExcel Display FormatUnsupported Formats
Timeh:mm:sshh:mm:ssZ
Hh:mm:ss.f-f
dateTimem/d/yyyy h:mmyyyy-mm-ddThh:mm:ssZ
yyyy-mm-ddThh:mm:ss+/-hh:mm
yyyy-mm-ddThh:mm:ss.f-f
Years outside the range between 1900 to 9999
dateDate *3/14/2001yyyy-mm-ddZ
yyyy-mm-dd+/-hh:mm
Years outside the range between 1900 to 9999
gYearNumber, no decimalsyyyy+/-hh:mm
Years outside the range between 1900 to 9999
gDayNumber, no decimals
gMonth
gYearMonthCustom mmm-yyyyyy-mm+/-hh:mm
Years outside the range between 1900 to 9999
gMonthDayCustom d-mmm
Anytype
anyURI
Base64Binary
Duration
ENTITIES
ENTITY
HexBinary ID
IDREF
IDREFS
language
Name
NCName
NMTOKEN
NMTOKENS
normalizedString
NOTATION
QName
String
token
Text
BooleanBoolean
Decimal
Float
Double
Byte
Int
Integer
Long
negativeInteger
nonNegativeInteger
nonPositiveInteger
positiveInteger
Short unsignedByte
unsignedInt
unsignedLong
unsignedShort
General
Leading and trailing zeros are dropped.
'-' and '+' signs are respected, although only negative signs appear.
Excel stores and calculates with 15 significant digits of precision.

APPLIES TO
  • Microsoft Office Excel 2003
Keywords: 
kbinfo KB840475
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate