Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xslx
Message
De
08/12/2014 12:49:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Xslx
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611889
Message ID:
01612000
Vues:
75
>>>>>Does any know of a program that can convert xslx to xls (capable of being imported VFP) that can be run in batch mode
>>>>
>>>>Are you able to use Excel itself? You can programmatically automate Excel from VFP, and instruct it to SaveAs an earlier version.
>>>>
>>>>Of course, if you do have the option to automate Excel then you can access the contents of .xlsx files directly without having to use the VFP import function.
>>>
>>>Al
>>>
>>>Thanks for the answer - yesy I can use Excel - how do I programmatically automate Excel from VFP, and instruct it to SaveAs an earlier version?
>>>
>>
>>
>>oXL = CreateObject("Excel.Application")
>>oXL.Workbooks.Open("YourFile.XLS")
>>oXL.ActiveWorkbook.Save("YourFile", nDesiredFormat)
>>oXL.Quit()
>
>
>>
>>
>>Use 56 for Excel 97 format. That said, I don't think newer versions can actually produce an Excel 97 format that VFP can read. You have to go back to Excel 5 format for that to work; I think the constant you want is 39.
>>
>>Tamar
>
>
>Tamar
>
>I don't understand - the file I am trying to convert is an xslx file to xls file - will your code do that?

Yes, except that I have a mistake in the 3rd line. It should be SaveAs rather than Save. Plus, you'll want to specify the file with the XLSX extension in the 2nd line.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform