>>
lcFile = GETFILE("xls*")
>>TRY
>> IMPORT FROM (lcFile) XLS
>>CATCH
>> ** catch block assumes you're trying to import XLSX file so it opens it and then saves it as XLS
>>ENDTRY
>>
>>When I execute the IMPORT command VFP simply exits. No error messages. No CATCH commands. No "Send to Microsoft". No nothing.
>>
>>I'm sure it has something to do with the spreadsheet and I think it has to do with the spreadsheet having macros in it.
>>
>>Can somebody please enlighten me about conditions which could cause this kind of behavior?
>>
>
>Did you try XL5 or XL8 instead of XLS?
>
>Tamar
I hadn't but now I did........unfortunately the same result. VFP simply closes.
We've tried opening the file and saving it in several formats and didn't save until we tried Excel Workbook. This produced a dialog box about saving as a macro-free workbook. This version "worked" in that the IMPORT command gave an error about "Invalid Format." We already trap for this and use Excel to open the file and save in a compatible format.
I would obviously prefer not to use the Import command but it just isn't practical to find all the applications that do this and re-write them with a different algorithm.
Again, all insights appreciated..........Rich