tags:

views:

37

answers:

1

Hi!

I'm using the PHPExcel plugin for Symfony 1.4 (sfPHPExcelPlugin) on Ubuntu (using PHP 5.10), with this code for saving the file that I am writing:

// Save Excel 2007 file
echo date('H:i:s') . " Write to Excel2007 format\n";
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));

// Echo done
echo date('H:i:s') . " Done writing file.\r\n";

I am sure that the execution is reaching this part of the code, because the echo messages are shown but I am not downloading the Excel file! Could it be because I am trying it in Linux, not in Windows?

Thank you!

+2  A: 

There is nothing in this code that results in you downloading the file. It simply saves it to the disk.

Maerlyn
Thanks! It was exactly that, the save() did save but in the /lib/model folder.... :-/
Tere