BUG: APPEND FROM TYPE XL8 Makes VFP 6 Disappear

ID: Q217174


The information in this article applies to:


SYMPTOMS

Issuing the APPEND FROM <xlfile.xls> TYPE XL8 command makes Visual FoxPro disappear. Sometimes the following error message appears before the application closes:

Fatal error: Exception code=C0000005
After selecting OK, Visual FoxPro disappears.


CAUSE

This is known to happen if over approximately 350 cells in the Excel spreadsheet have been copied and then the Paste Special, Values option is used. The actual number of cells varies.


RESOLUTION

Here are a few possible resolutions to this problem:


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

This mainly happens with files in an Excel 97 format, which for purposes of Visual FoxPro's APPEND command, is version 8.0. The TYPE XL8 clause for Excel 97 files was added in Visual FoxPro 6.0. Visual FoxPro 5.x and earlier did not have this option.

Steps to Reproduce Behavior

WARNING: The following steps cause Visual FoxPro to crash. Please make sure that you save all important data or code before following the steps. It is also a good idea to save all information in any other running applications before you use these steps:

  1. In Excel 97, create a new file.


  2. Place the following data in the corresponding cells:


  3. A1: 1
    A2: 2
    A3: 3
    B1: =CONCATENATE("Hello",A1)

  4. Press the F5 key to open the GoTo dialog box, then type the following and then click OK:


  5. A1:A4000

  6. From the Edit menu, point to Fill, then choose Series. In the Series dialog box, select OK. This fills the column with numbers from 1 to 4,000.


  7. Press the F5 key again, then type the following and then click OK:


  8. B1:B4000

  9. From the Edit menu, point to Fill, then choose Down. This fills the columns with the formula.


  10. While B1:B4000 is selected, from the Edit menu, select Copy, then select Edit, Paste Special. In the Paste Special dialog box, select Values, then choose OK. Before doing anything else, press the ESCAPE key to get rid of the copy marquee. Pressing the ESCAPE key after pasting is important because if you press the ENTER key, the formulas will be pasted back in the cells.


  11. Save the Excel file. By default, it should save as a Microsoft Excel Workbook. For these steps, call the file Append.xls and place it in your Visual FoxPro default directory to avoid pathing problems.


  12. Close Excel.


  13. In Visual FoxPro 6.0, issue these commands in the Command window to create a new table and append in the Excel file. Remember that Visual FoxPro should disappear after the APPEND FROM command so make sure everything is saved:


  14. 
       CREATE TABLE appendtest (num I, char C(40))
       APPEND FROM append.xls TYPE XL8 


REFERENCES

For additional information about problems with the APPEND command, please see the following article(s) in the Microsoft Knowledge Base:

Q193628 BUG: APPEND FROM with Certain File Types Crashes VFP

Additional query words: kbDSE


Keywords          : kbVFp600bug kbXBase KbDBFDBC 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 6, 1999