>>>>This is my VFP code - comes up with unrecognised command verb on first line - what am I doing wrong?
>>>>
>>>>
>>>>oXL = CreateObject("Excel.Application")
>>>>oXL.Workbooks.Open("c:\aatemp\global.XLSX")
>>>>oXL.ActiveWorkbook.Save("c:\aatemp\globalnew.xls", 56)
>>>>oXL.Quit()
>>>>
>>>
>>>Do you have Excel installed? What is the version?
>>>
>>>I just tested this code
>>>
>>>
>>>oXL = CreateObject("Excel.Application")
>>>oXL.Workbooks.Open(GETFILE('xlsx'))
>>>*oXL.ActiveWorkbook.Save("c:\aatemp\globalnew.xls", 56)
>>>oXL.Quit()
>>>
>>>worked fine for me, no errors.
>>
>>do I need to have the latest version of Excel installed ie the one that can read xslx files
>
>Yes, I believe you need to have the version that can open xlsx files for this code to work.
Thanks Naomi
I have just installed it and run the code
SET DEFAULT TO c:\aatemp
oXL = CreateObject("Excel.Application")
oXL.Workbooks.Open(GETFILE('xlsx'))
oXL.ActiveWorkbook.Save("c:\aatemp\globalnew.xls", 39)
oXL.Quit()
But I am getting Invalid number of parameters on active workbook line
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing