Win32::OLE problem -- command line vs. CGI 
Author Message
 Win32::OLE problem -- command line vs. CGI

I have a Perl script using Win32::OLE that interacts with an Excel
spreadsheet.  The script works perfectly from the command line on the
server, but fails when run as a CGI program.  Any ideas?  The script fails
at the line defining the Excel object, i.e., :

my $ex = Win32::OLE->GetActiveObject('Excel.Application') ||
Win32::OLE->new('Excel.Application', 'Quit');

$ex does not get defined when the script is run from remote via CGI, but
does get defined when the script is run from the command line on the Web
server.

Using ActiveState Perl, build 623 on O'Reilly's WebSite Pro.  But tested on
an IIS machine with the same result.

Uday



Wed, 08 Oct 2003 05:21:47 GMT  
 Win32::OLE problem -- command line vs. CGI

Quote:

> I have a Perl script using Win32::OLE that interacts with an Excel
> spreadsheet.  The script works perfectly from the command line on the
> server, but fails when run as a CGI program.  Any ideas?

Have you tried http://www.perl.com/pub/doc/FAQs/cgi/perl-cgi-faq.html?
If it works from the command line but not through CGI, it is almost
certainly a CGI issue -- not a perl problem.

Jon



Wed, 08 Oct 2003 07:32:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. OLE:Storage vs Win32::OLE for Word Directory List

2. executing commands, command-line vs. browser

3. -ln015 on #! line -vs- command line

4. Win32::OLE Problems: OLE error 0x80010001

5. command line problems in win32

6. Trouble using scalar vs number with Win32::OLE

7. DBM problem from CGI, not command line

8. OLE in ActiveWare port vs OLE in GS port

9. OLE in AS port vs OLE in GS port

10. LIBWWW - Command Line vs Web Browser

11. command line parameters (.bat vs .pl)

12. price of perl (was Re: GUI vs command line)

 

 
Powered by phpBB® Forum Software