>Hello Ramon! I am using your enumproc utility from the downloads section, great tool BTW. I have a question. I have built a web app using WW WebConnect, and am exporting a XLS spreadsheet to a DBF using OLE Automation. Unfortunately, half the time after the export EXCEL.exe is still running. I was planning to use your
termiproc.prg to terminate excel.exe. I works great the first time I call it, for example,
>
>with oExcel
>.DisplayAlerts = .f.
>.WorkBooks.open(lcTempXLSFileName)
>.activeworkbook.activesheet.usedrange.select
>.activeworkbook.activesheet.usedrange.columns.Autofit()
>.activeworkbook.saveas(lcDBFFile,xlDBF3) && saves Excel file as VFP table
>.activeworkbook.Saved = .t.
>.quit()
>endwith
>
>do termiproc with "C:\Program Files\Microsoft Office\Office\excel.exe"
>>htmltemplate(this)
>Response.write('
Table created successfully.')
>htmlfooter(this)
>
>I get the message that my table was created.
>However, the next hit to the web server after this call returns this error:
>Error Number: 1
>Error: File 'getprivateprofilestring.prg' does not exist.
>
>Running Method: getprofilestring
>Current Code: __ri_delete_sites()
>Current Code Line: 317
>>If I stop the COM server and restart it again, I am ok until I run that line of code again. I can run that code locally on a local process from the command window repetitively without issue. Any ideas what I have done wrong?
>TIA
>Amanda
Amanda,
You're using oExcel.quit. Why don't you also release the oExcel ref ? Doing that way I think you wouldn't have need for terminating excel.exe. Just my .02 cents.
Cetin