XL: Fields Truncated When File Is Saved in .DBF Format

Last reviewed: February 2, 1998
Article ID: Q104441
The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition
  • Microsoft Excel for Windows, versions 2.x, 3.x, 4.x, 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 2.x, 3.x, 4.x, 5.0, 5.0a
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows

SYMPTOMS

If a Microsoft Excel document contains a database with more than 128 columns and you save the file in dBASE file format, you may only save the first 128 columns of the database. When you close and reopen the file, the columns after the 128th column will be missing.

CAUSE

This situation occurs because the .DBF file formats will only support a maximum of 255 fields per record in .DB4, 128 fields per record in .DB3, and 32 fields per record in .DB2.

The number of columns that are saved depends on your version of Microsoft Excel as well as the version of dBASE that the file is saved in. Based on your version of Microsoft Excel or dBASE, all of the columns of data may be saved, 32 of the columns may be saved, 128 of the columns may be saved, or 255 of the columns will be saved. The following table shows how many columns of data will be saved when the database is saved in various .DBF file formats:

    Version
    of Excel         Platform     File Type     Number of Columns
    -------------------------------------------------------------

    All              All          DBF2               32
    All              All          DBF3              128
    4.0              Windows      DBF4              128
    4.0              Macintosh    DBF4              255
    4.0a             Windows      DBF4              255
    5.0              Windows/NT   DBF4              255
    5.0a             Macintosh    DBF4              255
    5.0c             Windows      DBF4              255
    7.0              Windows 95   DBF4              255
    97               Windows      DBF4              255

WORKAROUND

To retrieve a dBASE IV file with more than 128 fields in Microsoft Excel for Windows version 4.0, open the file in Q+E, and then save it as a Microsoft Excel file. When you subsequently open the file in Microsoft Excel, all fields are intact.

To export a database to the dBASE format: save the database as a Microsoft Excel file, open it in Q+E, and then save the file as a dBASE file (DB4 format).

REFERENCES

"User's Guide 1," version 4.0, pages 57-63 "User's Guide," version 3.0, pages 129-136


Additional query words: 3.0 3.00 4.0a 4.00a 5.0 5.00 5.0c 5.00c 7.0
7.00 7.0a 7.00a 8.00 97 XL97
Keywords : xlloadsave
Version : WINDOWS:2.0,3.0,4.0,5.0,7.0,97; MACINTOSH:2.0,3.0,4.0,5.0,98
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.