Web query converts numbers that contain hyphens into dates in Excel


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.


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.


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.
  2. In the Address box, type the address of the Web page that contains the table that you want to import, and then click Go.
  3. Click the appropriate table marker to select the table that you want to import.
  4. Click Options.
  5. Under Other Import settings, click to select the Disable date recognition check box.
  6. Click OK two times to finish your Web query.
Excel now imports your data as text instead of dates.

ID do Artigo: 287027 - Última Revisão: 31 de jan de 2007 - Revisão: 1