title: PHPEXCEL Fatal error: Allowed memory size of 134217728 bytes exhausted Issue for addTableRow() method
body: <p>First of all I know there is huge memory usage for PHPExcel while creating Excel sheet from database. I am using mysql database and the rows returned are about 14K plus. I need to generate Excel sheet for these records.</p>
  
  <p>It is possible to generate Excel sheet using this code for small entries, however for 14K records this code is breaking. I saw caching cell techniques but being a newbie with PHPExcel I find it very difficult. </p>
  
  <p>Can anyone guide me to solve this issue.</p>
  
  <p>Source: <a href="https://github.com/segy/PhpExcel" rel="nofollow">https://github.com/segy/PhpExcel</a></p>
  
  <p>Below is my code snippet:</p>
  
  <pre><code>App::import('Component', 'PhpExcel');
  $phpExcelObj = new PhpExcelComponent();
  $phpExcelObj-&gt;createWorksheet()-&gt;setDefaultFont('Calibri', 12);
  // define table cells
  $table = array(
  array('label' =&gt; ('Id'), 'wrap' =&gt; true),
  array('label' =&gt; ('Name'), 'wrap' =&gt; true, 'filter' =&gt; true),
  array('label' =&gt; ('Email_id'), 'wrap' =&gt; true, 'filter' =&gt; true),
  array('label' =&gt; ('status'), 'wrap' =&gt; true, 'filter' =&gt; true)
              );
  $phpExcelObj-&gt;addTableHeader($table, array('name' =&gt; 'Cambria', 'bold' =&gt; true));
  $indx = 1;
  foreach ($ckt_dtls as $usr_dtls) {
  $rows[] = $indx;
  $rows[] = $usr_dtls['name'];
  $rows[] = $u_email;
  $rows[] = $stat;
  $indx++;
  $phpExcelObj-&gt;addTableRow($rows);
  }
  $phpExcelObj-&gt;addTableFooter()-&gt;output($filename = $filename, $writer = 'Excel2007');
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to 
  allocate 57 bytes) in /var/www/4thambit_v6/app/vendors/PHPExcel/Worksheet.php on line 1218
  </code></pre>