Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP8 importing from Excel
Message
De
28/01/2009 14:03:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01377715
Message ID:
01377801
Vues:
25
You're welcome.

>That did the trick, thank you. Tamar did point out why export wasn't working as expected.
>
>
>>>>I want to import from an XLS file via: "impo FROM e:some-xls-file.xls type xls"
>>>>but it fails and a google seach reveals known issues. Has anyone got a quick resolution to this?
>>>
>>>For Excel 2003 format, use TYPE XL8. For Excel 2007 format, you can't use IMPORT. Unfortunately, Excel 2007 is broken, so that even when you save in the earlier format, you can't IMPORT/APPEND those files.
>>>
>>>Tamar
>>
>>This probably depends. I have a supplier who used to send me his procelist in an old Excel format, but last autumn they clearly updated to Excel 2007, and my import routine was broken. Instead of rewriting my importing routine, I added this code which reads the Excel file and writes it back in the older Excel format.
>>lcFile='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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform