Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert .xls to .cvs
Message
 
 
To
03/03/2010 23:54:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01452345
Message ID:
01452415
Views:
51
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform