title: How to skip column when do horizontal looping phpexcel
body: <pre><code>$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('E7', "LAST PURCHASE");
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E7:H7');
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E9:F9');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('G9:H9');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E10:F11');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('G10:H11');
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('E7:H11')-&gt;applyFromArray($BStyle3);
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('E7:H11')-&gt;applyFromArray($BStyle3);
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('E12:H18')-&gt;applyFromArray($BStyle2);
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E19:F19');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E20:F20');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('E21:F21');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('G19:H19');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('G20:H20');
  $objPHPExcel-&gt;getActiveSheet()-&gt;mergeCells('G21:H21');
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('E19:H21')-&gt;applyFromArray($BStyle2);
  
  
  $sql2= "SELECT * FROM qefvendor"; 
  $result2=mysqli_query($conn,$sql2);
  $n='E';
  
  
  
  while ($row = mysqli_fetch_array($result2)) {
  
      $roc_no=$row['roc_no'];
      $company_name=$row['company_name'];
      $sql = "SELECT * FROM avl_1 WHERE  roc_no ='$roc_no'";
  
                      $result = mysqli_query($conn,$sql);
  
                      while ($row_result = mysqli_fetch_array($result)) {
                          $counter1++;
                           $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue($n.'8',$row_result['company_name']);
  
  
  
  
                  $n++;
                  }
  
  }
  </code></pre>
  
  <p>this is the code where i make the table. there merge cell i made in the table.</p>
  
  <p><a href="https://i.stack.imgur.com/DQAtQ.png" rel="nofollow noreferrer">THIS LINK WHERE RESULT of the table and looping</a></p>
  
  <p><a href="https://i.stack.imgur.com/Ur5dl.png" rel="nofollow noreferrer">THIS the image reselt i want where it skip the column</a></p>