Skip to content

Commit

Permalink
Reset current row to zero when you switch worksheets so you begin at …
Browse files Browse the repository at this point in the history
…the top
  • Loading branch information
rushi committed Aug 19, 2015
1 parent 9d8dbb8 commit 0d4dd6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Service/ExcelWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ public function setup($author = '', $title = '')

/**
* Create a new worksheet, and set it as the active one
*
* @param int $index Location at which to create the sheet (NULL for last)
* @param string $title The title of the sheet
* @throws \PHPExcel_Exception
*/
public function setWorksheet($index, $title)
{
$this->handle->createSheet($index);
$this->resetCurrentRow(0);
$this->handle->setActiveSheetIndex($index);
$this->setSheetTitle($title);
}
Expand Down

0 comments on commit 0d4dd6f

Please sign in to comment.