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\"