Problem with Graph generation

Topics: Developer Forum, User Forum
Jul 4, 2013 at 12:20 PM
Hi,

I generate a Graph and get the Excel File with:

...

header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="massnahmenexport.xlsx"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0,pre-check=0');
header('Pragma: public');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(true);
$objWriter->save('php://output');

Local on a Debian Server (PHP Version 5.3.3-7+squeeze14, Apache/2.2.16 (Debian)) it works.

On the live Server (PHP Version 5.3.26-1~dotdeb.0, Apache/2.2.16 (Debian)) the document is corrupt. Excel can repair the document and the graph is ok.

I have the same result with the example from 33chartcreate-bar.php.

any suggestions
Sep 11, 2013 at 1:30 PM
hi, you want to save the file and then open it?

to save server somewhere you put the url in

$objWriter->save("URL");

The Header is to open the file after saving it,



forgive me but I'm writing using a translator