Microsoft KB Archive/157455

= PRB: Import Wizard Fails Reporting "No Fields Were Found" =

Article ID: 157455

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q157455



SYMPTOMS
The Import Wizard in Visual FoxPro fails with the message "No fields were found to copy" when trying to import a Microsoft Excel 5.0 workbook.



CAUSE
The active sheet in the workbook is empty.



RESOLUTION
Make the sheet with the data to be imported the active sheet when the Excel workbook is saved.



STATUS
This behavior is by design.



MORE INFORMATION
The Import Wizard looks at only the active sheet in the Excel workbook.

Another way to import a sheet from an Excel 5.0 workbook is to use the Import command on the File menu. The dialog box displayed by the Import command has a drop-down list box where you can choose a specific sheet from an Excel workbook. Of course, the sheet containing the data would have to be known. The Import command echoes the following command into the Visual FoxPro Command window assuming an Excel file named Abc.xls and Sheet 7 is chosen in the Sheet drop-down list box.

IMPORT FROM abc.xls TYPE XL5 SHEET "Sheet7"

You can then issue this command either in the Command window or in a program.

