Solved

How can I clear excel.exe process When using PHP + COM  Excel

Posted on 2009-07-16
1
267 Views
Last Modified: 2013-12-13
I am working on PHP + COM  Excel.
When every time I run my code , it will generate new excel.exe process.
my code have
$book->Close(false);
   $excel->Quit();
  $excel = null;
unset($book);
unset($excel);
It looks not work.
If I add $excel->Release(); , it will give me error
Uncaught exception 'com_exception' with message 'Error [0x80020003] Member not found .

Any help?
Thanks
0
Comment
Question by:Tim
1 Comment
 
LVL 34

Accepted Solution

by:
gr8gonzo earned 500 total points
ID: 24875328
You can try to use a process killer program (like PSKill from http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx) that runs on a scheduled basis using the Windows task scheduler. The problem with that is that you could occasionally kill a process before it has finished creating the Excel. But it should at least work most of the time. I've suggested an alternative for creating Excel files in your other question.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Testing a string condition in PHP 6 23
Insert won't work due to space in column name 5 22
MySql and Apache/PHP Error Reporting 2 28
Fulfillment API php code sample 1 41
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question