title: Save 2D array as xls file
body: <p>I have 2d array and I need save this array data as xls file</p>
  
  <p>I am trying make this using <code>PHPExcel</code></p>
  
  <pre><code>include 'PHPExcel.php';
  
  
    $data = array(
      array("firstname" =&gt; "Mary", "lastname" =&gt; "Johnson", "age" =&gt; 25),
      array("firstname" =&gt; "Amanda", "lastname" =&gt; "Miller", "age" =&gt; 18),
    );
  
  $objPHPExcel = new PHPExcel();
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;fromArray($data);
  
  $objPHPExcel-&gt;save("test.xls");
  </code></pre>
  
  <p>But this gives error:  <code>Call to undefined method PHPExcel::save()</code></p>
  
  <p>What is right way for saving array as xls using <code>PHPExcel</code> ?</p>