如何在PHP中的Excel文件中停止插入空行?

I am quite new to PHPExcel. I am trying to write a code which reads an Excel file (test.xlsx) and copy specific data into another Excel (dashboard.xlsx)

Here is my code:

<?php
   for ($col = 0; $col <= $highestColumnIndex;$col++) {
      $objSheet
         ->setCellValueByColumnAndRow($col, $row,$worksheet
         >getCellByColumnAndRow($col, $row)
         ->getValue());
      }
   }
?>

The problem that is occurring is that blank rows are being inserted into the file dashboard.xlsx.

Please help.