Wednesday, 25 March 2009

Sending excel file to browser

Polished up the management screens and added an export facility (to Excel) for the gallery data. This is how to send an excel file to the browser.

header("Content-type: application/");
header("Content-Disposition: attachment;
header("Pragma: no-cache");
header("Expires: 0");
// then send tab-delimited rows of your data

No comments:

Post a Comment