See also: <a href="http://api.drupal.org/api/5/function/drupal_set_header">http://api.drupal.org/api/5/function/drupal_set_header</a><br><br><div><span class="gmail_quote">On 1/31/07, <b class="gmail_sendername">Jeremy Epstein
</b> <<a href="mailto:jazepstein@gmail.com">jazepstein@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 2/1/07, Moshe Weitzman <
<a href="mailto:weitzman@tejasa.com">weitzman@tejasa.com</a>> wrote:<br>> no, thats not the right function. you just need to send the right http<br>> headers and then print out your excel data. see <a href="http://us2.php.net/header">
http://us2.php.net/header</a>.<br>> you can use that function directly. no benefit to going through drupal here.<br><br>That's right, setting the HTTP headers is the key to doing this. The<br>most common way to force a file download prompt is to set the
<br>'content-disposition' header, which you can do in PHP like this:<br><br>header('Content-Disposition: attachment; filename="downloaded.pdf"');<br><br>However, this is not officially part of the HTTP standard (although it
<br>is widely supported), and it has issues with Internet Explorer. See<br><a href="http://www.hanselman.com/blog/TheContentDispositionSagaControllingTheSuggestedFileNameInTheBrowsersSaveAsDialog.aspx">http://www.hanselman.com/blog/TheContentDispositionSagaControllingTheSuggestedFileNameInTheBrowsersSaveAsDialog.aspx
</a><br>for more details.<br><br>Cheers,<br>Jaza.<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br> Johan Forngren <br><br> <a href="mailto:johan@forngren.com">johan@forngren.com</a> :: <a href="http://johan.forngren.com/">
http://johan.forngren.com/</a>