in reply to Using Spreadsheet::WriteExcel with mod_perl and Content-Disposition?

And if you're returning something that you think the browser can display inline (like a graphic), you could use this:
print "Content: $page\r\n"; print "Content-disposition: inline; filename=\"$page\"\r\n"; my $size = (-s "$page"); print "Content-length: $size\r\n"; print "Content-type: application/octet-stream\r\n"; print "\r\n"; local $/ = undef; open (F, "<$page") || die; binmode(F); binmode(STDOUT); print <F>; close(F);



THE UNIX CAR: you have to rebuild the engine whenever you hang a new air freshener in the car.

Replies are listed 'Best First'.
Re: inline attachments
by one4k4 (Hermit) on Mar 15, 2001 at 05:19 UTC
    So basically, I still dont know how to take the WriteExcel data and stuff it into a variable? (read my replies above..)
    I -could- write it to a temp file, read the temp file into a var, delete said temp file, and go from there...

    Hrm, that might work.
    Oh well. Its almost friday. :)