With these headers you can force a download from php, for example, to let the user download a csv frmatted text.
To make all the thing works you have to print data with “tabs” char, even if csv means “comma separeted value”. This is necessary because Microsoft Excel will understand tabs, but not commas.
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"yourfilename.xls\""); /* here print rows with values separeted by tab char: "\t" */