original_string: protected function createResponse(PHPExcel $excel, $fileName)
      {
          $writer = new PHPExcel_Writer_Excel2007($excel);
          ob_start();
          $writer->save('php://output');
          $content = ob_get_clean();
          $response = new Response();
          $response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
          $response->headers->set('Content-Disposition', 'attachment;filename="'.$fileName.'"');
          $response->headers->set('Cache-Control', 'max-age=0');
          $response->setContent($content);
  
          return $response;
      }
code: protected function createResponse(PHPExcel $excel, $fileName)
      {
          $writer = new PHPExcel_Writer_Excel2007($excel);
          ob_start();
          $writer->save('php://output');
          $content = ob_get_clean();
          $response = new Response();
          $response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
          $response->headers->set('Content-Disposition', 'attachment;filename="'.$fileName.'"');
          $response->headers->set('Cache-Control', 'max-age=0');
          $response->setContent($content);
  
          return $response;
      }
code_tokens: protected function createResponse ( PHPExcel $ excel , $ fileName ) { $ writer = new PHPExcel_Writer_Excel2007 ( $ excel ) ; ob_start ( ) ; $ writer -> save ( 'php://output' ) ; $ content = ob_get_clean ( ) ; $ response = new Response ( ) ; $ response -> headers -> set ( 'Content-Type' , 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ) ; $ response -> headers -> set ( 'Content-Disposition' , 'attachment;filename="' . $ fileName . '"' ) ; $ response -> headers -> set ( 'Cache-Control' , 'max-age=0' ) ; $ response -> setContent ( $ content ) ; return $ response ; }
docstring: Generates a response object for a PHPExcel object.
  
  @param PHPExcel $excel
  @param $fileName
  
  @return Response
docstring_tokens: Generates a response object for a PHPExcel object .