Excel is not closing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hai all,
Im tryiing to access Excel object like following from PHP, scripting
language.
After calling this excel is not closing after the execution.
If we comment the 'FreezePanes' property its working file.

$excel_app = new COM("Excel.Application");
$excel_app->ActiveWindow->FreezePanes = True;

thanks in advance,
San.
 
san,
I don't know PHP well, but I assume that is the same as this VB code:
Dim XLApp as Object
Set XLApp=CreateObject("Excel.Application")
XLApp.ActiveWindow.FreezePanes = True

However, is there actually any window yet as you have not added/opened any
workbooks ?
Check the value of ActiveWindow.

Not sure, but if the application or window is not visible, it may error.

NickHK
 
Thanks for the repay. :-)
No effect.
already used like this.
$workbook->close();
$excel_app->Quit();
 
Thanks for the replay.

$workbook->close();
$excel_app->Quit();
these two statements are already used before closing.
 
San,
Yes, but from your code, there is no ActiveWindow as there is no workbook.
Unless you missed half of your code.
Probably best asked in a PHP NG.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top