Skip to content

Commit

Permalink
Possibilty to change the ReadOnly behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Baachi committed Apr 15, 2015
1 parent 1306ae4 commit 853a396
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Ddeboer/DataImport/Reader/ExcelReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ class ExcelReader implements CountableReaderInterface, \SeekableIterator
* @param \SplFileObject $file Excel file
* @param int $headerRowNumber Optional number of header row
* @param int $activeSheet Index of active sheet to read from
* @param boolean $readOnly If set to false, the reader take care of the excel formatting (slow)
*/
public function __construct(\SplFileObject $file, $headerRowNumber = null, $activeSheet = null)
public function __construct(\SplFileObject $file, $headerRowNumber = null, $activeSheet = null, $readOnly = true)
{
$reader = \PHPExcel_IOFactory::createReaderForFile($file->getPathName());
$reader->setReadDataOnly(true);
$reader->setReadDataOnly($readOnly);
/** @var \PHPExcel $excel */
$excel = $reader->load($file->getPathname());

Expand Down

0 comments on commit 853a396

Please sign in to comment.