Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Win32::OLE and CGI ?

by jwherbold (Novice)
on Apr 18, 2001 at 00:19 UTC ( [id://73321]=perlquestion: print w/replies, xml ) Need Help??

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

I am trying to run a simple program to open an Excel file (work in placing data in it later) I can get it to run via the command line, but I need it to run through a browser, by that I mean, I need the user to run a script and it open the users Excel (not the servers). I try the basic code but I get the following error(s) on the browser:

Win32::OLE(0.1401) error 0x80080005: "Server execution failed" at D:\D +WH_web\CGI_BIN2\testing\test_excel.pl line 7 Can't call method "Workbooks" on unblessed reference at D:\DWH_web\CGI +_BIN2\testing\test_excel.pl line 11.


and the following on the server log (Win2K):

Detection of product '{00000409-78E1-11D2-B60F-006097C998E7}', feature + 'EXCELFiles', component '{CC29E96F-7BC2-11D1-A921-00A0C91E2AA2}' fai +led Detection of product '{00000409-78E1-11D2-B60F-006097C998E7}', feature + 'EXCELFiles' failed during request for component '{CC29E96F-7BC2-11D +1-A921-00A0C91E2AA2}' Failed to connect to server. Error: 0x80004001


Any help and/or ideas would be great, solutions would be better ;-)

Thanks in advance

John

Replies are listed 'Best First'.
Re: Win32::OLE and CGI ?
by dws (Chancellor) on Apr 18, 2001 at 01:02 UTC
    (Caveat: I don't yet have experience with IIS5.0, so this may be off target.)

    I assume that you've already verified the obvious: Excel is installed on the server. A less obvious problem can be one of permission.

    By default, IIS 4.0 on NT executes CGIs using a user context that does not have access to all facilities on the server. Instructions for changing that user context to one that does can be found here.

    Try that, and see if you get any further.

      Yes Excel is installed on the server, however my goal is to open up excel on the client. What I am trying to do, is use this in conjunction with DBI, and give the user the option to run a report, and bring the data back into Excel for the user.

      I know that I could send back an excel file with another module, but I thought the OLE would be the way to go, and I could learn more this way... there I go thinking again ;-)

      Thanks
      John
        Ah. Then what you probably want to is use Spreadsheet::WriteExcel to generate the bits for an Excel file, then send those bits back down the wire to the client with a Content-type of "application/vmd.ms-excel".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found