Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append From ...
Message
From
25/04/2008 02:27:28
 
 
To
25/04/2008 01:31:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01312934
Message ID:
01313076
Views:
29
You're welcome. But I see that I forgot one line, Erase (lcFile), after the Append from.

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform