BUG: IMPORT or APPEND FROM Empty Spreadsheet Gives Error

Last reviewed: June 27, 1995
Article ID: Q124586
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

Importing or appending an empty Spreadsheet (no data in it) into FoxPro, results in the "File Read Error" error massage.

RESOLUTION

Use an ON ERROR Routine to trap the error.

Sample Code

ON ERROR DO MyError && Calls the Procedure MyError for any error IMPORT FROM <Spreadsheet> TYPE XLS ON ERROR &&Sets FoxPro back to its default Error Handler PROCEDURE MyError

   IF ERROR() = 1104
     ** Error: File Read Error
     WAIT WINDOW "The Spreadsheet is Empty"
   ENDIF
RETURN

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. In Excel, save a Spreadsheet with no data in it as an Excel version 4.0 Worksheet

  2. In FoxPro, enter this Command:

    IMPORT FROM <Spreadsheet> TYPE XLS


Additional reference words: FoxWin 2.60a buglist2.60a
KBCategory: kbinterop kbcode kbbuglist
KBSubcategory: FxotherGeneral


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.