Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to open Excel file with VFP
Message
 
À
06/10/2004 14:13:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00949285
Message ID:
00949314
Vues:
11
Paul,

To "read myexcel.xls within VFP" you can use Excel.automation, or use the VFP IMPORT command. There are also other ways to do it. Probably if you provide more details about "read", you will get more precise answer.

As for checking whether it is Excel file or not, then in many cases Excel opens the "notExcel" file without any problems treating it as a delimited format. So I would not lean on Excel here.
One of the ways to check the file type is:
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
oFile=ofso.GetFile(fullpath_name)
if "EXCEL"$upper(oFile.Type)
   **OK
....
Best Wishes

>Hello,
>
>How to read myexcel.xls within VFP ?
>
>and detect if it is not an Excel file by giving some errors.
>
>Tia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform