i am using this code to save an excel document to a csv.
the problem is the xlCSV part.
vfp errors and says "Variable 'XLCSV' is not found. any ideas?
Code:
loExcel = Createobject([Excel.application])
With loExcel
STORE 'mcInFile = "'+GETFILE('XLS')+'"' TO excelfile
&excelfile
loExcel.workbooks.Open(mcInFile)
loSheet = .activesheet
With loSheet
.Range([A1]).Select
Endwith
ENDWITH
loExcel.Workbooks(1).SaveAs('MyCSV.csv',xlCSV)
loExcel.workbooks.CLOSE
loExcel.Quit
Release loExcel
Code:
loExcel.Workbooks(1).SaveAs('MyCSV.csv',xlCSV)