From b1c61d1be0266c8572de39f1e6d0bf10b2cf2cc7 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Tue, 7 May 2013 12:50:42 +0100 Subject: [PATCH] Fix file rewind in SYLK reader --- Classes/PHPExcel/Reader/SYLK.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/SYLK.php b/Classes/PHPExcel/Reader/SYLK.php index a6e22e6..cacfc87 100644 --- a/Classes/PHPExcel/Reader/SYLK.php +++ b/Classes/PHPExcel/Reader/SYLK.php @@ -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."); } $fileHandle = $this->_fileHandle; + rewind($fileHandle); $worksheetInfo = array(); $worksheetInfo[0]['worksheetName'] = 'Worksheet'; @@ -227,7 +228,7 @@ class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_ } $fileHandle = $this->_fileHandle; rewind($fileHandle); - + // Create new PHPExcel while ($objPHPExcel->getSheetCount() <= $this->_sheetIndex) { $objPHPExcel->createSheet();