Performance tweaks

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@84523 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2011-12-30 01:08:05 +00:00
parent 86db0b8535
commit 6ea0ff9bfd
1 changed files with 3 additions and 3 deletions

View File

@ -215,7 +215,7 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
while ($objPHPExcel->getSheetCount() <= $this->_sheetIndex) {
$objPHPExcel->createSheet();
}
$objPHPExcel->setActiveSheetIndex( $this->_sheetIndex );
$sheet = $objPHPExcel->setActiveSheetIndex( $this->_sheetIndex );
$lineEnding = ini_get('auto_detect_line_endings');
ini_set('auto_detect_line_endings', true);
@ -259,7 +259,7 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
// Set our starting row based on whether we're in contiguous mode or not
$currentRow = 1;
if ($this->_contiguous) {
$currentRow = ($this->_contiguousRow == -1) ? $objPHPExcel->getActiveSheet()->getHighestRow(): $this->_contiguousRow;
$currentRow = ($this->_contiguousRow == -1) ? $sheet->getHighestRow(): $this->_contiguousRow;
}
// Loop through each line of the file in turn
@ -276,7 +276,7 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
}
// Set cell value
$objPHPExcel->getActiveSheet()->getCell($columnLetter . $currentRow)->setValue($rowDatum);
$sheet->getCell($columnLetter . $currentRow)->setValue($rowDatum);
}
++$columnLetter;
}