Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to open Excel file with VFP
Message
 
To
06/10/2004 14:13:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949285
Message ID:
00949314
Views:
10
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
Previous
Reply
Map
View

Click here to load this message in the networking platform