FIX: Import Wizard Does Not Import Spreadsheet Cells as Null (162073)



The information in this article applies to:

  • Microsoft Visual FoxPro for Macintosh 3.0b
  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b

This article was previously published under Q162073

SYMPTOMS

When importing an Excel 5.0 for Macintosh spreadsheet or an Excel 7.0 for Windows 95 spreadsheet containing blank cells with the Import Wizard, the resulting fields in the new table contain zeros. This behavior occurs regardless of the value of the SET NULL command.

RESOLUTION

Issue a SET NULL ON command and use the IMPORT command. You can also use the APPEND FROM ... Type XL5 command after creating a table that supports null numeric values.

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 Visual FoxPro 5.0 for Windows.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a spreadsheet that contains some blank cells. Make sure the cells are numeric.
  2. Save the spreadsheet into the Visual FoxPro folder and close Excel.
  3. Type the following command in the Command window:

    SET NULL ON

  4. Start the Import Wizard, change the file type to Excel 5.0, and continue with the import process. In step three, notice the blank cells now appear as fields containing zeros.
  5. Click Finish.
  6. After the Import Wizard closes, open the new table and browse it. The fields that should be blank contain zeros.
  7. Close the table and delete the file.
  8. Type the following command in the Command window:

    SET NULL ON

  9. Select Import from the File menu. Import the file as type Excel 5.0.
  10. Type the following command in the Command window:

    BROWSE

    Notice the fields in the table contain null values where appropriate.

Modification Type:MajorLast Reviewed:10/15/2003
Keywords:kbBug kbfix KB162073