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:
01452414
Vues:
43
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\"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform