Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Using Excel in Perl failure after OS re-install

by merrymonk (Hermit)
on Mar 03, 2019 at 14:29 UTC ( [id://1230787]=note: print w/replies, xml ) Need Help??


in reply to Re: Using Excel in Perl failure after OS re-install
in thread Using Excel in Perl failure after OS re-install

Thank you
I tried you suggestion but got the following error on the failing PC

Perl v5.28.0

Win32::OLE Version 0.1712 Win32::OLE(0.1712) error 0x800401f3: "Invalid class string" at line with my $excel = Win32::OLE->new('Excel.Application') or die Win32::OLE->LastError();

However on the PC where the test works, you suggestion also works.
The Perl version and Win32:OLE version were the same on both PCs.

Have you any idea why the systems are giving different results?
  • Comment on Re^2: Using Excel in Perl failure after OS re-install

Replies are listed 'Best First'.
Re^3: Using Excel in Perl failure after OS re-install
by poj (Abbot) on Mar 03, 2019 at 14:38 UTC

    Do both PCs have the same version of Excel ?

      ..good question!
      I have just realised that on the failing PC the line
      printf "Excel %s\n",$excel->{'version'};
      gave nothing at all - however on the successful PC I got Excel 14.0
      I used the same disc for both PCs (I am in the process of replacing the old PC for a new one).
      On both PCs Excel is stored in same directory .../Office14.
      Therefore I thought I had but one does not seem to be 'recognised'.
        ..more about the versions.
        Going to the Help where it gives more details about the version, I find that the Version: number and Product ID are different on the 2 PCs.
        Could this be significant?
Re^3: Using Excel in Perl failure after OS re-install
by merrymonk (Hermit) on Mar 03, 2019 at 14:36 UTC
    ...an update If i remove the last section of the $excel line so that it is
    my $excel = Win32::OLE->new('Excel.Application') ;
    it does not give the Class error but neither does it work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230787]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2026-02-07 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.