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

Click here to load this message in the networking platform