Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append From ...
Message
De
25/04/2008 02:27:28
 
 
À
25/04/2008 01:31:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01312934
Message ID:
01313076
Vues:
30
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform