Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert .xls to .cvs
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01452345
Message ID:
01452415
Vues:
52
Check Re: Importing CSV Thread #1388402 Message #1388459 (and you may view the whole thread)

See also Re: Saveas: do not keep incomp. functions, do not keep chang Thread #1243150 Message #1243237

>Hi Naomi
>Sounded right when you wrote it but the macro does not translate very well into vfp language. Below was full macro info - i did try and remove some of it without sucess. Can i try your code when you have some time?
>
>thanks
>k
>
>
>
>procedure convert
>oExcel = Createobject("Excel.Application")
>	If Vartype(oExcel) != "O"
>* could not instantiate Excel object
>* show an error message here
>		Return .F.
>	Endif
>
>	oWorkbook = oExcel.Application.Workbooks.Open ("C:\mydirectory\myfile.xls")
>	oExcel.Visible = .T.
>	oExcel.Application.UserControl=.T.
>	oExcel.Application.Interactive=.T.
>	
>    ChDir "C:\mydirectory\"
>    ActiveWorkbook.SaveAs Filename:="C:\mydirectory\admits.csv", FileFormat:= _
>        xlCSVMSDOS, CreateBackup:=False
>   ChDir "C:\vfp\"
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform