There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Maybe this is a mod_perl issue, but I need to have a user download a dynamically created spreadsheet. (created using Spreadsheet::WriteExcel)
Basically, here is how it should go.. Click link to download sheet mod_perl module pulls q's from the DataBase, Prints "Content-type: application/excel(or some needed varient)" Prints "Content-Disposition: inline; filename=$name" Then the spreadsheet is opened like so... my $workbook = Spreadsheet::WriteExcel->new("-"); Only, the data isnt sent to the browser. Now, maybe I'm quite young with this stuff but I'd think since I set the Content-type headers that it would prompt the user to save the file. It works outside of mod_perl I have been reading about 'headers_out()' and 'send_httpd_header'(I believe thats what it was...) and have gotten just about nowhere. I've got the Eagle book, on mod_perl, and cant seem to find anything on Disposition. There is a discussion here on the mod_perl archives that is similar, but doesnt seem to offer me a solution. In httpd.conf I have: PerlSendHeader Onbut is that needed? I read that in a discussion somewhere. Has anybody done this before? I mean, I'm sure somebody has, but umm, how did they do it? Regardless, thanks for pointing me in the right direction if its at all possible. _14k4 - webmaster@860.org (www.poorheart.com)
|
|