Teaser Posted January 27, 2011 Share Posted January 27, 2011 Hi, The goal is that users will click on a image on the webpage and the data held on the page is to download into excel. Including the header and footer details on the report on the webpage. I have the below which opens up the excel document etc when the user clicks on the image but dont know how to download the data. Any assistance would be much appreciated. <?php $filename = "excel download.xls"; header("Pragma: public"); $display="attachment"; header('Content-Type: application/vnd.ms-excel'); header("Content-Disposition: $display; filename=$filename"); header("Cache-Control: no-cache"); ?> Link to comment https://forums.phpfreaks.com/topic/225831-call-html-header-to-download-data-from-webpage-to-excel/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.