OL97: Truncated Data From Imported dBase File

ID: Q167755

The information in this article applies to:

SYMPTOMS

If you save a Microsoft Excel 97 workbook, containing a named range, in a dBase (*.dbf) file format and then import the dBase file into Microsoft Outlook 97, some of the data may be truncated.

CAUSE

When you save a Microsoft Excel file in a dBase format, with some cells in your named range narrower than the width of the data, that data is truncated because it does not fit within the visual selection of the named range.

RESOLUTION

You can resolve this problem two ways.

MORE INFORMATION

When you define a named range in an Microsoft Excel worksheet, the data in the last column may appear outside of the selected area if the width of the column is narrower than its data. If you save the workbook as a dBase file and then import it into Outlook, the data that did not fit within the last column is truncated. If you use the same procedure, but save the file as an Microsoft Excel workbook file, the imported data does not truncate.

The following steps demonstrate this problem:

Create and Save a dBase File in Microsoft Excel

1. In a new Microsoft Excel workbook, type the following information into

   Sheet1:
     A           B          C
   +---------+--------+------------+
 1 |FirstName|LastName|HomePhone   |
   |---------|--------|------------|
 2 |John     |Doe     |111-222-3333|
   |---------|--------|------------|
 3 |Jane     |Doe     |444-555-6666|
   +---------+--------+------------+

2. Make sure that the width of column C is not wide enough to
   accommodate the telephone numbers. On most computers, the default width
   of column C is too narrow and the telephone numbers continue into
   column D.

3. Drag to select the range of cells A1:C3. Note that the telephone
   number digits that do not fit within column C appear outside of
   the visible selected range.

4. On the Insert menu, click Name and then Define.

5. In "Names in workbook," type Contacts and click OK.

6. On the File menu, click Save As.

7. In File name, type Contacts.

8. In the "Save as type" list, click "DBF4(dBASE IV)(*.dbf)" and click

   Save.

Importing the dBase File Into Outlook Contacts

1. Start Outlook.

2. On the File menu, click "Import and Export."

3. In the "Choose an action to perform" list, click to select "Import from

   Schedule+ or another program or file" and click Next.

4. In the "Select file type to import from" list, click to select dBase
   and click Next.

5. In "File to import," type the path and file name of your
   Contacts.dbf file or click Browse to navigate to the file you saved
   in Microsoft Excel and click Next to continue.

6. In the "Select destination folder" list, click your Contacts folder and
   click Next.

7. In "The following actions will be performed" list, click to select
   "Import 'Contacts.dbf' into the 'Contacts' folder." This action will
   open the "Map Custom Fields" dialog box.

8. Under To, click the plus symbol to the left of the field, Name to
   expand the field view. You should see Title, First Name, Middle Name,
   Last Name and Suffix under the Name field.

9. Under "From dBase Contacts.dbf," drag each field (FIRSTNAME, LASTNAME,
   and HOMEPHONE), one at a time, to a corresponding field under "To
   Microsoft Outlook Contacts." Drag FIRSTNAME to First Name, LASTNAME to
   Last Name, and HOMEPHONE to Home Phone.

10. Click OK and then Finish.

When you view John and Jane Doe in your Outlook Contacts folder, the Home telephone number is truncated.

REFERENCES

For more information on data lost saving in a dBase format from Microsoft Excel, please see the following article in the Microsoft Knowledge Base:

   Article-ID:   Q46228
   Title     :   XL5: Data Lost When File Saved in .DBF File Format

For more information on Importing from Microsoft Excel into Outlook, please see the following article in the Microsoft Knowledge Base:

   Article-ID:   Q161556
   Title     :   OL97: Importing from Microsoft Excel Requires Named Range

Keywords          : IntpODBC 
Version           : WINDOWS:97
Platform          : WINDOWS

Last Reviewed: June 3, 1998