Q: PHPExcel not saving my new sheet I am using PHPExcel for create new sheet for an existing excel file with 3 sheets.
$newWorkSheet = new PHPExcel_Worksheet($objPHPExcel, 'filter');
$this->objPHPExcel->addSheet($newWorkSheet);

After calling $this->objPHPExcel->getSheetCount() it prints 4.
But when I see the current excel file, there is not any new sheet.

A: This is only creating an in-memory instance of the sheet.  It will need to be written to disk.

A: You are forgetting the save part..
example..
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));

Further Example in the official docs
http://phpexcel.codeplex.com/wikipage?title=Examples&referringTitle=Home
