denap has asked for the wisdom of the Perl Monks concerning the following question:

Hey all... I've got a script, works dandy in office 2k, and am trying to run it on XP pro with office xp (10?) and having problems. Any attempt to set a property, $excel->{Calculation} = xlCalculateManual;, for example, fails; UNLESS I'm running under Komodo. ??? The script then fails for other reasons... but I cannot seem to get past the session init stage from cmd. Anyone got OLE experience can lend a neuron?

Replies are listed 'Best First'.
Re: ole (excel xp) problem
by NetWallah (Canon) on Dec 23, 2003 at 20:11 UTC
    According to msdn, Calculation is a property of the Application object. Hence, I would suggest (untested):
    $excel->{Application}->{Calculation} = xlCalculateManual;

    "When you are faced with a dilemma, might as well make dilemmanade. "
      Sorry for not being clearer... my $excel is set to an application object.
Re: ole (excel xp) problem
by maa (Pilgrim) on Dec 24, 2003 at 08:35 UTC

    Hi,
    you havn't said if you get an error message with this... have you imported the Excel constants before using xlCalculateManual?

    use Win32::OLE::Const 'Microsoft Excel';

    Just a thought - Mark