Updating Excel cell...works in debugger only

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JaxDawg

    Updating Excel cell...works in debugger only

    Hey folks...
    I've got an interesting problem. I'm updating and displaying an excel
    spreadsheet (using com) from a php file. Works great in the debugger
    (PhpEd 4.6), but not otherwise. I assume there must be a difference in
    PHP versions in effect here.
    Instantiating com, opening workbook, activating sheet, selecting cell,
    activating cell all work just fine... but when I try to set the cell
    value, I just get "waiting on localhost" and it never returns.

    Code snippet:

    $cell = $sheets->Cells($home_ro w[$row_num],2) ; //Select the cell
    $cell->activate; //Activate the cell
    $cell->value = stripslashes($r ow['player_name']);

    The last statement, setting the cell value is where it never returns
    from. No error, just "waiting".

    As I said... no issues at all in the debugger.
    My setup:
    Win2000, Apache 2.0.55, PHP 5.1.4

    I'm tempted to drop down to PHP 4 and see if that makes a difference.
    Apparently, PHP 5 has had com issues - but I thought they had been
    resolved in this release. The prev version, v5.1.2 wouldn't even open
    the workbook, this version(5.1.4) does , tho.

    Thanks for any help!!

  • Chung Leong

    #2
    Re: Updating Excel cell...works in debugger only

    JaxDawg wrote:
    Hey folks...
    I've got an interesting problem. I'm updating and displaying an excel
    spreadsheet (using com) from a php file. Works great in the debugger
    (PhpEd 4.6), but not otherwise. I assume there must be a difference in
    PHP versions in effect here.
    Instantiating com, opening workbook, activating sheet, selecting cell,
    activating cell all work just fine... but when I try to set the cell
    value, I just get "waiting on localhost" and it never returns.
    >
    Code snippet:
    >
    $cell = $sheets->Cells($home_ro w[$row_num],2) ; //Select the cell
    $cell->activate; //Activate the cell
    $cell->value = stripslashes($r ow['player_name']);
    >
    The last statement, setting the cell value is where it never returns
    from. No error, just "waiting".
    >
    As I said... no issues at all in the debugger.
    My setup:
    Win2000, Apache 2.0.55, PHP 5.1.4
    >
    I'm tempted to drop down to PHP 4 and see if that makes a difference.
    Apparently, PHP 5 has had com issues - but I thought they had been
    resolved in this release. The prev version, v5.1.2 wouldn't even open
    the workbook, this version(5.1.4) does , tho.
    >
    Thanks for any help!!
    Does the Apache service have access to the desktop? Otherwise I don't
    think Excel will start.

    Go to Control Panel, Administrative Tools, Services and check the
    properties of Apache.

    Comment

    Working...