Merge pull request #273 from PowerKiKi/issue_is_text

ISTEXT() return wrong result if referencing an empty but formatted cell
This commit is contained in:
Mark Baker 2013-11-23 13:00:50 -08:00
commit aa5a9d4168

View File

@ -233,10 +233,12 @@ class PHPExcel_Cell
{ {
// set the value according to data type // set the value according to data type
switch ($pDataType) { switch ($pDataType) {
case PHPExcel_Cell_DataType::TYPE_NULL:
$this->_value = $pValue;
break;
case PHPExcel_Cell_DataType::TYPE_STRING2: case PHPExcel_Cell_DataType::TYPE_STRING2:
$pDataType = PHPExcel_Cell_DataType::TYPE_STRING; $pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
case PHPExcel_Cell_DataType::TYPE_STRING: case PHPExcel_Cell_DataType::TYPE_STRING:
case PHPExcel_Cell_DataType::TYPE_NULL:
case PHPExcel_Cell_DataType::TYPE_INLINE: case PHPExcel_Cell_DataType::TYPE_INLINE:
$this->_value = PHPExcel_Cell_DataType::checkString($pValue); $this->_value = PHPExcel_Cell_DataType::checkString($pValue);
break; break;
@ -379,7 +381,7 @@ class PHPExcel_Cell
{ {
return $this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA; return $this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA;
} }
/** /**
* Does this cell contain Data validation rules? * Does this cell contain Data validation rules?
* *