Microsoft KB Archive/275069

= ACC2002: Date Is Displayed as a Number When You Import an Open Excel Workbook =

Article ID: 275069

Article Last Modified on 9/27/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q275069



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you use the Import wizard to import and open Excel workbook, Date fields are displayed as numeric values.



CAUSE
Typically, the Import wizard uses the Excel ISAM driver to retrieve data from an Excel workbook. However, if the Excel file is open and not shared, the Microsoft Jet database engine uses another method to retrieve the data. This other method produces this behavior.



RESOLUTION
To make sure that dates are displayed properly when you import an Excel file into Access, either close the Excel file, or permit the file to be shared. You can share the file in Excel 2002 as follows:


 * 1) In Excel, open the file that you want to share.
 * 2) On the Tools menu, click Share Workbook.
 * 3) In the Share Workbook dialog box, click the Editing tab, and then click the Allow changes by more than one user at the same time check box.



Steps to Reproduce the Behavior

 * 1) Open the Northwind sample database, and then export the Employees table as an Excel file named Employees.xls.
 * 2) Open the Employees.xls file in Excel. Note that both the BirthDate and the HireDate fields display date values.
 * 3) Open an Access database file.
 * 4) On the File menu, point to Get External Data, and then click Import to start the Import wizard.
 * 5) In the Import Wizard dialog box, select Microsoft Excel(*.xls) in the Files of Type box, select the Employees.xls file, and then click Import.
 * 6) Scroll through the sample data to the right. Note that both the BirthDate and the HireDate fields display numeric data.

Additional query words: pra prb MsExcel worksheet

Keywords: kbnofix kbprb KB275069

-

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

© Microsoft Corporation. All rights reserved.