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:
01452448
Vues:
67
This message has been marked as the solution to the initial question of the thread.
>Thanks Naomi. that was helpful. I'm getting there. I have pieced together the folowing code.
>
>The only problem remaining is that the save options still pop up for cvs regardless of visible option or not
>any suggestions?
>
>k
>
>
>set safety off
>oExcel = Createobject("Excel.Application")
>#DEFINE xlCSVMSDOS 24
>
>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 = .F.
>oExcel.Application.UserControl=.F.
>oExcel.Application.Interactive=.F.  &&& I still get save pop ups --- only remain problem
>
>
>if val(oExcel.Version) > 11
>oExcel.ActiveWorkbook.SaveAS("c:\mydirectory\mynewfile.csv", xlCSVMSDOS )
>else
>oExcel.ActiveWorkbook.SaveAS("c:\mydirectory\mynewfile.csv", xlCSVMSDOS ) 
>endif
>
>
>oExcel.Visible = .T.  &&& save options still pops up in vfp even if i keep detting to .F. for all three
>oExcel.Application.UserControl=.T.
>oExcel.Application.Interactive=.T.
>
>oExcel.quit()
>oExcel = .Null.
>
>copy file c:\vaniermu\admission.csv to c:\vaniermu\admission.txt  &&& this works resolves the above problem
>
oExcel.DisplayAlerts = .f.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform