>Hi, when we use oxls=getobject("myexcel.xls") in vfp program to do some automation work, we use oxls =0 or relase oxls command to clear ole connection. However, the task manager in NT computer always open EXCEL.EXE session. It will cause some problem when we try to open an excel file later in a directory which contains many excel files.
>Can some one help me? Thanks.
In addition to Terry's comments, you'll also need to release all the references to any Excel objects, not just oExcel. For example, if you have:
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Add()
oSheet1 = oWorkbook.Sheets[1]
you'll need to release not only oExcel, but oWorkbook, and oSheet. *ANY* object reference leftover will prevent Excel from completely releasing.
Hope this helps.
- della