Microsoft KB Archive/287027

= Web query converts numbers that contain hyphens into dates in Excel =

Article ID: 287027

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Office Excel 2007
 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition

-



This article was previously published under Q287027



SYMPTOMS
When you import data from a Web page by using a Web query, some numbers may be imported as dates. For example, when you import a table that contains win/loss statistics for sports teams, if a column contains the value 6-10, Excel imports that value as 10-Jun.

Note The date conversion may vary, depending on your regional settings in Control Panel.



CAUSE
By default, when you create a new Web query, Microsoft Excel converts strings of two and three numbers that are separated by hyphens into dates.



RESOLUTION
To prevent Excel from automatically converting numbers to dates, follow these steps when you create a new Web query:
 * 1) In Microsoft Office Excel 2003 or in Microsoft Excel 2002, point to Import External Data on the Data menu, and then click New Web Query.

In Microsoft Office Excel 2007, click From Web in the Get External Data group on the Data tab.
 * 1) In the Address box, type the address of the Web page that contains the table that you want to import, and then click Go.
 * 2) Click the appropriate table marker to select the table that you want to import.
 * 3) Click Options.
 * 4) Under Other Import settings, click to select the Disable date recognition check box.
 * 5) Click OK two times to finish your Web query.

Excel now imports your data as text instead of dates.

Additional query words: prb XL2002 XL xl2003 xl2007

Keywords: kbprb KB287027

-

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

© Microsoft Corporation. All rights reserved.