title: Fatal Error: PHPExcel when trying to merge cells?
body: <p>Hi guys all i'm trying to do here is merge two sets of two cells together, however whenever I run this I get a fatal error that says this </p>
  
  <blockquote>
    <p>Fatal error: Call to undefined method PHPExcel::mergeCells() in /home3/hutch/public_html/MurphyNew/SendDocument.php on line 128</p>
  </blockquote>
  
  <p>Anyone know why this is. Here's my code:</p>
  
  <pre><code>Include_once 'PHP/PHPExcel.php';
  
      $sheet = new PHPExcel();
      $activeSheet = $sheet-&gt;getActiveSheet();
      $sheet-&gt;getActiveSheet()-&gt;setTitle('Senior Managers Site Tour');
      $sheet-&gt;getActiveSheet()-&gt;getColumnDimension('A')-&gt;setWidth(77);
  
      $styleArray = array(
      'borders' =&gt; array(
          'allborders' =&gt; array(
              'style' =&gt; PHPExcel_Style_Border::BORDER_THIN
              )
          )
      );
  
      $sheet-&gt;getActiveSheet()-&gt;getStyle('A5:D7')-&gt;applyFromArray($styleArray);
      unset($styleArray); 
      $sheet-&gt;mergeCells('C6:D6');
      $sheet-&gt;mergeCells('C7:D7');
  
      $activeSheet-&gt;setCellValue('C2','Senior Managers Site Tour');
  
      $activeSheet-&gt;setCellValue('B5','Site / Project / Object:');
      $activeSheet-&gt;setCellValue('C5',$spo);
      $activeSheet-&gt;setCellValue('D5','Contract Number:');
      $activeSheet-&gt;setCellValue('E5',$cont);
      $activeSheet-&gt;setCellValue('B6','Site Manager:');
      $activeSheet-&gt;setCellValue('C6',$site);
      $activeSheet-&gt;setCellValue('B7','Job / Task Description:');
      $activeSheet-&gt;setCellValue('C7',$job);
  
      $activeSheet-&gt;setCellValue('B9','OBSERVATION');
      $activeSheet-&gt;setCellValue('B10','Breif Description:');
      $activeSheet-&gt;setCellValue('B11',$des1);
      $activeSheet-&gt;setCellValue('C10','Agreed Action:');
      $activeSheet-&gt;setCellValue('C11',$act1);
      $activeSheet-&gt;setCellValue('D10','Close Date:');
      $activeSheet-&gt;setCellValue('D11',$date1);
  
      $activeSheet-&gt;setCellValue('B13','GOOD PRACTICE');
      $activeSheet-&gt;setCellValue('B14','Breif Description:');
      $activeSheet-&gt;setCellValue('B15',$des2);
      $activeSheet-&gt;setCellValue('C14','Agreed Action:');
      $activeSheet-&gt;setCellValue('C15',$act2);
      $activeSheet-&gt;setCellValue('D14','Close Date:');
      $activeSheet-&gt;setCellValue('D15',$date2);
  
      $activeSheet-&gt;setCellValue('B17','FEEDBACK GIVEN / RECEIVED');
      $activeSheet-&gt;setCellValue('B18','Breif Description:');
      $activeSheet-&gt;setCellValue('B19',$des3);
      $activeSheet-&gt;setCellValue('C18','Agreed Action:');
      $activeSheet-&gt;setCellValue('C19',$act3);
      $activeSheet-&gt;setCellValue('D18','Close Date:');
      $activeSheet-&gt;setCellValue('D19',$date3);
  
      $activeSheet-&gt;setCellValue('B20','GENERAL IMPRESSION');
      $activeSheet-&gt;setCellValue('B21','1 = No evidence / poor / no understanding');
      $activeSheet-&gt;setCellValue('C21','2 = Some evidence / understanding / not consistent');
      $activeSheet-&gt;setCellValue('B22','3 = Requirements in place / basic unerstanding');
      $activeSheet-&gt;setCellValue('C22','4 = Detailed understanding / more than minimum standards');
  
      $activeSheet-&gt;setCellValue('B24','CULTURE');
      $activeSheet-&gt;setCellValue('B25','Is the CDP obvious - You Said / We Did Boards; Feedback Stations; Posters?:');
      $activeSheet-&gt;setCellValue('C25',$P1Radio1);
      $activeSheet-&gt;setCellValue('B26','Are there any Speak Up Coaches on this site?');
      $activeSheet-&gt;setCellValue('C26',$P1Radio2);
      $activeSheet-&gt;setCellValue('B27','Are Focus Leader meetings happening?:');
      $activeSheet-&gt;setCellValue('C27',$P1Radio3);
      $activeSheet-&gt;setCellValue('B28','Mention the Mental Tools, do people understand them?:');
      $activeSheet-&gt;setCellValue('C28',$P1Radio4);
      $activeSheet-&gt;setCellValue('B29','Ask what "Never Harm" means to the teams:');
      $activeSheet-&gt;setCellValue('C29',$P1Radio5);
  
      $activeSheet-&gt;setCellValue('B31','GENERAL IMPRESSION (SYSTEM)');
      $activeSheet-&gt;setCellValue('B32','Are first impressions good, site signage, induction etc?:');
      $activeSheet-&gt;setCellValue('C32',$P2Radio1);
      $activeSheet-&gt;setCellValue('B33','Is the site tidy, well laid out etc?:');
      $activeSheet-&gt;setCellValue('C33',$P2Radio2);
      $activeSheet-&gt;setCellValue('B34','Are morning briefings / daily risk assessment carried out?:');
      $activeSheet-&gt;setCellValue('C34',$P2Radio3);
      $activeSheet-&gt;setCellValue('B35','Have all the team been briefed &amp; signed onto the RAMS?:');
      $activeSheet-&gt;setCellValue('C35',$P2Radio4);
      $activeSheet-&gt;setCellValue('B36','Ask what they would do if there was a change in the work activity i.e. not in RAMS?:');
      $activeSheet-&gt;setCellValue('C36',$P2Radio5);
  
      $activeSheet-&gt;setCellValue('B38','GENERAL IMPRESSION (COMMENTS)');
      $activeSheet-&gt;setCellValue('B39','Additional Comments:');
      $activeSheet-&gt;setCellValue('C39',$add);
  
      $activeSheet-&gt;setCellValue('A41','COMPLETED BY');
      $activeSheet-&gt;setCellValue('A42','Name:');
      $activeSheet-&gt;setCellValue('B42',$name);
      $activeSheet-&gt;setCellValue('A43','Title:');
      $activeSheet-&gt;setCellValue('B43',$title);
      $activeSheet-&gt;setCellValue('A44','Date:');
      $activeSheet-&gt;setCellValue('B44',$date);
  
      $objWriter = PHPExcel_IOFactory::createWriter($sheet, 'Excel5');    
      $objWriter-&gt;save('Senior Managers Site Tour.xls');
  </code></pre>