Skip to content

Commit

Permalink
Merge pull request #163 from afurculita/master
Browse files Browse the repository at this point in the history
Adds SeekableIterator to ExcelReader
  • Loading branch information
Baachi committed Mar 7, 2015
2 parents 3cc324d + 489f02c commit 7d52e77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Ddeboer/DataImport/Reader/ExcelReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
* @link http://phpexcel.codeplex.com/
* @link https://github.com/logiQ/PHPExcel
*/
class ExcelReader implements CountableReaderInterface
class ExcelReader implements CountableReaderInterface, \SeekableIterator
{
protected $worksheet;
protected $headerRowNumber;
protected $pointer = 0;
protected $columnHeaders;

/**
* Total number of rows
Expand All @@ -35,6 +36,7 @@ public function __construct(\SplFileObject $file, $headerRowNumber = null, $acti
{
$reader = \PHPExcel_IOFactory::createReaderForFile($file->getPathName());
$reader->setReadDataOnly(true);
/** @var \PHPExcel $excel */
$excel = $reader->load($file->getPathname());

if (null !== $activeSheet) {
Expand Down

0 comments on commit 7d52e77

Please sign in to comment.