Fix file rewind in SYLK reader

This commit is contained in:
Mark Baker 2013-05-07 12:50:42 +01:00
parent fd2a3773d8
commit b1c61d1be0

View File

@ -140,6 +140,7 @@ class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
} }
$fileHandle = $this->_fileHandle; $fileHandle = $this->_fileHandle;
rewind($fileHandle);
$worksheetInfo = array(); $worksheetInfo = array();
$worksheetInfo[0]['worksheetName'] = 'Worksheet'; $worksheetInfo[0]['worksheetName'] = 'Worksheet';
@ -227,7 +228,7 @@ class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_
} }
$fileHandle = $this->_fileHandle; $fileHandle = $this->_fileHandle;
rewind($fileHandle); rewind($fileHandle);
// Create new PHPExcel // Create new PHPExcel
while ($objPHPExcel->getSheetCount() <= $this->_sheetIndex) { while ($objPHPExcel->getSheetCount() <= $this->_sheetIndex) {
$objPHPExcel->createSheet(); $objPHPExcel->createSheet();