Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Problem using Win32::OLE on apache

by lepetitalbert (Monsignor)
on Feb 04, 2008 at 15:22 UTC ( #665979=perlquestion: print w/ replies, xml ) Need Help??
lepetitalbert has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear Monks,

I have this code :

my $Excel = Win32::OLE->new('Excel.Application') or die "Could not sta +rt excel"; $Excel->{'Visible'} = 0; $Excel->{DisplayAlerts} = 0; my $file = "E:/www/aglocal/Inlook/excel/facture.xls"; if ( -e $file ) { print h1( 'found' ); } else { print h1( 'NOT found' ); } if ( -r $file ) { print h1( 'readable' ); } else { print h1( 'NOT readable' ); } if ( -w $file ) { print h1( 'writable' ); } else { print h1( 'NOT writable' ); } my $Book = $Excel->Workbooks->Open ( "$file" ) or die "$! : $file\n"; # open Excel file
output :
found readable writable Software error: Bad file descriptor : E:/www/aglocal/Inlook/excel/facture.xls
This code works on the server I used until now, but not on a win32 apache 2.2.8

Is there something I missed about apache ?

Have a nice day !

"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Comment on Problem using Win32::OLE on apache
Select or Download Code
Re: Problem using Win32::OLE on apache
by Errto (Vicar) on Feb 04, 2008 at 16:08 UTC
    It's hard to say exactly what sort of error might be happening but you can use Win32::OLE->LastError to retrieve the detailed message ($! will contain something invalid, probably a non-sequitur).

      Hi Errto

      Win32::OLE->LastError : (translated from french)

      Win32::OLE(0.1707) error 0x80010105: "The server generated an exceptio +n" in METHOD/PROPERTYGET "Open"
      Found some similar problems on google but no answer

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

        Hello monks,

        the problem disappeared in the night is did not reappear since.

        Have a nice day.

        "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://665979]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-07-11 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (236 votes), past polls