BUG: APPEND FROM TYPE XL8 Makes VFP 6 Disappear
ID: Q217174
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, version 6.0
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:
- Save the Excel file as an Excel 5.0/95 workbook, or earlier, and use the APPEND FROM command to transfer the data.
- Save the Excel file as a tab or comma delimited (.csv) text file and use the APPEND FROM command to transfer the data.
- Use the Import command in Visual FoxPro. Import is on the File menu or you can code:
IMPORT FROM append.xls XL8
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:
- In Excel 97, create a new file.
- Place the following data in the corresponding cells:
A1: 1
A2: 2
A3: 3
B1: =CONCATENATE("Hello",A1)
- Press the F5 key to open the GoTo dialog box, then type the following and then click OK:
A1:A4000
- 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.
- Press the F5 key again, then type the following and then click OK:
B1:B4000
- From the Edit menu, point to Fill, then choose Down. This fills the columns with the formula.
- 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.
- 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.
- Close Excel.
- 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:
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