Hi,
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(ALLTRIM(cfile))
oSheet := oExcel:ActiveSheet()
oExcel:quit()
but excel.exe still runnning in memory.
Thanks !
Shuming Wang
#include "fivewin.ch"
FUNCTION MAIN
cFile:="c:\users\anser\desktop\Test.xls"
MsgInfo("About to create Excel object")
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(ALLTRIM(cfile))
oSheet := oExcel:ActiveSheet()
MsgInfo("Open and Check Task Manager, you should find EXCEL.EXE in the Processes List")
oExcel:quit()
MsgInfo("Excel is closed. After you close this MsgBox,";
"you will not find EXCEL.EXE in the Task Manager, Processes List")
RETURN NIL
oWorkBook:=oExcel:WorkBooks:Open(ALLTRIM(cfile))
oWorkBook:Close()
oExcel:Quit()
TRY
oExcel = GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel = CreateObject("Excel.Application")
CATCH
MsgInfo("It seems that Excel is not installed on this PC. You need Excel to continue further")
Return .F.
END
END
lailton.webmaster wrote: oExcel:quit()
oExcel:=Nil
Release All
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Marc Venken and 98 guests