-
-
Save vijay07roy/7bb673b7cbe9226e77630296921fda3f to your computer and use it in GitHub Desktop.
PHPExcel output directly to browser #php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); | |
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); | |
header('Content-Disposition: attachment;filename="' . $filename . '.xlsx"'); | |
$objWriter->save('php://output'); | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment