Solved

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

Posted on 2009-07-16
1
266 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:zcfyhome
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now