07-25-2005 3:34 PM
I'm creating an Excel worksheet with OLE and Excel Macros and the file is created without any problems. The only issue I have is that when you close Excel, the process in Windows keeps running (CtrlShiftEscape to view the process EXCEL.EXE). Is this a known issue with Office 2003 or a problem in SAP4.6C with the OLE2 connection not closing properly.
TIA
07-25-2005 3:36 PM
first call quit application then free object
CALL METHOD OF gv_excel 'QUIT'.
FREE OBJECT gv_cell.
FREE OBJECT gv_excel.
FREE OBJECT gv_books.
FREE OBJECT gv_sheet.
take a look on FM ALSM_EXCEL_TO_INTERNAL_TABLE lines (112) just before the end of the function, to see how sap deal with this problem.
07-25-2005 3:36 PM
first call quit application then free object
CALL METHOD OF gv_excel 'QUIT'.
FREE OBJECT gv_cell.
FREE OBJECT gv_excel.
FREE OBJECT gv_books.
FREE OBJECT gv_sheet.
take a look on FM ALSM_EXCEL_TO_INTERNAL_TABLE lines (112) just before the end of the function, to see how sap deal with this problem.
07-25-2005 4:54 PM
Thanks for the fast reply Joseph, but unfortunetly, I don't want to close Excel automatically. The user must be able to visualize the file. I still tried the 'QUIT' method and the FREE OBJECT (which I already had) and it didn't work because the FREE OBJECT cell, workbook and range return errors. Any idea as to why they return errors (even if I QUIT excel).
07-25-2005 5:07 PM
NM. I found the problem (I changed the code and was freeing objects that weren't used, so they weren't instanciated). Now it works fine. Thanks Joseph.
07-25-2005 5:17 PM
I was about the response you to check your code
(Le plaisir etait pour moi)