Bugfix: Work item 16895 - PHP Invalid index notice on writing excel file when active sheet has been deleted

General: Work item 16923 - Datatype.php & constant TYPE_NULL

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@83260 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2011-11-25 12:16:01 +00:00
parent 77cd4ac9aa
commit cdbeceba47
7 changed files with 12 additions and 3 deletions

View File

@ -244,6 +244,12 @@ class PHPExcel
} else {
array_splice($this->_workSheetCollection, $pIndex, 1);
}
// Adjust active sheet index if necessary
if (($this->_activeSheetIndex >= $pIndex) &&
($pIndex > count($this->_workSheetCollection) - 1)) {
--$this->_activeSheetIndex;
}
}
/**

View File

@ -41,7 +41,7 @@ class PHPExcel_Cell_DataType
const TYPE_FORMULA = 'f';
const TYPE_NUMERIC = 'n';
const TYPE_BOOL = 'b';
const TYPE_NULL = 's';
const TYPE_NULL = 'null';
const TYPE_INLINE = 'inlineStr';
const TYPE_ERROR = 'e';

View File

@ -217,7 +217,7 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
}
$objPHPExcel->setActiveSheetIndex( $this->_sheetIndex );
$lineEnding = ini_set('auto_detect_line_endings');
$lineEnding = ini_get('auto_detect_line_endings');
ini_set('auto_detect_line_endings', true);
// Open file

View File

@ -651,7 +651,7 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader
const TYPE_FORMULA = 'f';
const TYPE_NUMERIC = 'n';
const TYPE_BOOL = 'b';
const TYPE_NULL = 's';
const TYPE_NULL = 'null';
const TYPE_INLINE = 'inlineStr';
const TYPE_ERROR = 'e';
*/

View File

@ -410,6 +410,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
} else {
switch ($cell->getDatatype()) {
case PHPExcel_Cell_DataType::TYPE_STRING:
case PHPExcel_Cell_DataType::TYPE_NULL:
if ($cVal === '' || $cVal === null) {
$this->_writeBlank($row, $column, $xfIndex);
} else {

View File

@ -40,9 +40,11 @@ Fixed in SVN:
auto_detect_line_endings now set in CSV reader
- Bugfix: (MBaker) Work item 16212 - $arguments improperly used in CachedObjectStorage/PHPTemp.php
- Bugfix: (MBaker) Work item 16643 - Bug In Cache System (cell reference when throwing caching errors)
- Bugfix: (MBaker) Work item 16895 - PHP Invalid index notice on writing excel file when active sheet has been deleted
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
- General: (MBaker) Work item 16643 - Add file directory as a cache option for cache_to_discISAM
- General: (MBaker) Work item 16923 - Datatype.php & constant TYPE_NULL
2011-02-27 (v1.7.6):