Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append From ...
Message
From
24/04/2008 14:39:10
 
 
To
24/04/2008 14:01:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01312934
Message ID:
01312951
Views:
115
This message has been marked as the solution to the initial question of the thread.
Your excel file must be in an older format. Here is my code to do this automatically.
lcFile='c:\mypath\myfile.xls' && remember full path!
Erase (Forceext(lcFile,'xxx')) && Just in case
ox=Createobject('excel.application')
owb=ox.Workbooks.Open(lcFile)
lcFile=Forceext(lcFile,'xxx')
ox.DisplayAlerts= .F.
owb.SaveAs(lcFile,39)
owb.close()
owb=.null.
ox=.null.
Release owb
Release ox
Select yourtable
append from (lcFile) xls
>Hi All
>
>I create an XLS file using Office 2007 but telling it to create a 97/2003 format file. This file will not import into VFP9 using
>
>
>APPEND FROM myfile.xls TYPE XL8
>
>
>It says the file is not in a valid format. Any ideas or suggestions about this?
lcFile='c:\mypath\myfile.xls'
Erase (Forceext(lcFile,'xxx'))
ox=Createobject('excel.application')
owb=ox.Workbooks.Open(lcFile)
lcFile=Forceext(lcFile,'xxx')
ox.DisplayAlerts= .F.
owb.SaveAs(lcFile,39)
owb.close()
owb=.null.
ox=.null.
Release owb
Release ox
append from (lcFile) xls
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform