Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append From ...
Message
From
25/04/2008 01:31:13
 
 
To
24/04/2008 14:39:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01312934
Message ID:
01313073
Views:
30
Thanks Tore. Got it working.


>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
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform