Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
more useful options
 
PerlMonks  

Re^2: Launching Excel from a CGI

by rashley (Scribe)
on Oct 30, 2006 at 13:31 UTC ( [id://581358]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Launching Excel from a CGI
in thread Launching Excel from a CGI

Think I got it:
sub retrieveFile { my $file = shift; if(not -e $file) { croak "Could not locate file: $file)"; } if(not open(FH, $file)) { croak "Could not open file: $file"; } my $filesize = -s $file; ## Note type will need to change based on the type of file that is ## returned. print $cgi->header(-type=>'application/vnd.ms-excel', -Content-Disposition=>"attachment; filename=$fi +le", -Content_Length=>$filesize); while(<FH>) { print; } close FH; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://581358]
help
Sections?
Information?
Find Nodes?
Leftovers?
    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.