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> &lt;<a href="mailto:jazepstein@gmail.com">jazepstein@gmail.com</a>&gt; 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 &lt;
<a href="mailto:weitzman@tejasa.com">weitzman@tejasa.com</a>&gt; wrote:<br>&gt; no, thats not the right function. you just need to send the right http<br>&gt; headers and then print out your excel data. see <a href="http://us2.php.net/header">
http://us2.php.net/header</a>.<br>&gt; you can use that function directly. no benefit to going through drupal here.<br><br>That&#39;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>&#39;content-disposition&#39; header, which you can do in PHP like this:<br><br>header(&#39;Content-Disposition: attachment; filename=&quot;downloaded.pdf&quot;&#39;);<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>&nbsp;&nbsp;Johan Forngren <br><br>&nbsp;&nbsp;<a href="mailto:johan@forngren.com">johan@forngren.com</a> :: <a href="http://johan.forngren.com/">
http://johan.forngren.com/</a>