FIX: IMPORT Truncates Character Fields from .WK3 File

Last reviewed: October 14, 1997
Article ID: Q105421
2.5x 2.60 | 2.5x 2.60
MS-DOS    | WINDOWS
kbprg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.5x, 2.6
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6

SYMPTOMS

Using the IMPORT command to import a Lotus 1-2-3 WK3 worksheet into FoxPro truncates any character-based fields to 8 characters.

RESOLUTION

To work around this problem, create a new structure for the file to be imported, and use the APPEND FROM command to import the data. For the example shown below under "More Information," issue the following commands:

   CREATE TABLE sheet1.dbf (alpha C(25))
   APPEND FROM "SHEET1.WK3" TYPE WK3

For more information about creating tables through the FoxPro user interface, see the "New" section of the chapter devoted to the File menu in the "User's Guide."

APPEND FROM is designed to add records to the end of the table in the current work area. For more information about APPEND FROM, see the "Language Reference" manual. The relevant section of the "Database Menu" chapter in the "User's Guide" explains how to append records to a table using the FoxPro user interface.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro 2.6a for Windows and MS-DOS.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Excel. In cell A1, enter the twenty-six letters of the English alphabet. Copy and paste this string into the next 9 cells in column A. You now have the equivalent of a one-column table consisting of 10 records.

  2. From the File menu, choose Save As. Under Save File As Type, select WK3. Give the sheet the name SHEET1.WK3, and save it to disk.

  3. Open FoxPro. In the FoxPro Command window, issue the following command:

          IMPORT FROM "SHEET1.WK3" TYPE WK3
    

FoxPro will report that ten records were imported. Browse the new table opened in the current work area, and note that the 26 characters have been truncated to 8. Display the structure of the table and note that only 8 bytes have been allocated to the width of the field.


Additional reference words: FoxWin FoxDos 2.50 2.50a 2.50b 2.60
fixlist2.60a buglist2.50 buglist2.50a buglist2.50b buglist2.60
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: FxinteropSpread
Keywords : FxinteropSpread kbbuglist kbfixlist kbprg
Version : 2.5x 2.60 | 2.5x 2.60
Platform : MS-DOS WINDOWS
Solution Type : kbfix


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: October 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.