Performance improvement for readers that reduces overheads when setting titles in multi-worksheet workbooks, by avoiding re-iterating through all worksheet/cells whenever a sheet title is set

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@83603 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker
2011-12-04 11:24:59 +00:00
parent c345c0e8ca
commit 5fb3ffceb0
6 changed files with 32 additions and 10 deletions
+4 -1
View File
@@ -414,7 +414,10 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
// Create new Worksheet
$objPHPExcel->createSheet();
$objPHPExcel->setActiveSheetIndex($worksheetID);
$objPHPExcel->getActiveSheet()->setTitle($worksheetName);
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula
// cells... during the load, all formulae should be correct, and we're simply bringing the worksheet
// name in line with the formula, not the reverse
$objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
if ((!$this->_readDataOnly) && (isset($sheet->PrintInformation))) {
if (isset($sheet->PrintInformation->Margins)) {