Created
September 21, 2012 07:17
-
-
Save outman/3760169 to your computer and use it in GitHub Desktop.
phpexcel for phpmailer
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
// get the content | |
@ob_start(); | |
$writer = PHPExcel_IOFactory::createWriter($excel, "Excel2007"); | |
$writer->save("php://output"); | |
$data = @ob_get_contents(); | |
@ob_end_clean(); | |
// set email attachment | |
$mail->AddStringAttachment($data, date('YmdHis') . '.xls'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I try to do the same to send as string in json format, but when I receive in dojo toolkit get the string in wrong code.