I have been able to successfully create a spreadsheet in excel using wincom, but I cannot seem to save the file programmatically.
DEFINE xlapp INTEGER
DEFINE xlwb INTEGER
DEFINE result INTEGER
DEFINE filename STRING
LET xlapp = -1
LET xlwb = -1
CALL ui.Interface.frontCall("WinCOM", "CreateInstance", ["Excel.Application"], [xlapp])
CALL ui.interface.frontCall("WinCOM", "CallMethod",[xlapp, "WorkBooks.Add"], [xlwb])
....
LET wfname='c:\\tmp\\testfile.xls'
CALL ui.Interface.frontCall("WinCOM","CallMethod",[xlapp,"Workbook.SaveAs",wfname],[res])
Errors out with
One or more of the names were not known. The returned array of DISPIDs contains DISPID_UNKNOWN for each entry that corresponds to an unknown name.
I have also tried
LET wfname='filename:=c:\\tmp\\testfile.xls'
CALL ui.Interface.frontCall("WinCOM","CallMethod",[xlapp,"Workbook.SaveAs",wfname],[res])
with similar results.
I have also swapped the xlapp with xlwb in case that was it.
I know I am close, but cannot succeed.
Thanks,