Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Method to get the original value as a string #680

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions Classes/PHPExcel/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ class PHPExcel_Cell
*
*/
private $formulaAttributes;

/**
* Original value without formatting
*
* @var string
*/
private $_originalValue;

/**
* Send notification to the cache controller
Expand Down Expand Up @@ -191,7 +196,16 @@ public function getFormattedValue()
->getNumberFormat()->getFormatCode()
);
}


/**
* Get cell value with formatting
* @return string
*/
public function getOriginalValue()
{
return $this->_originalValue;
}

/**
* Set cell value
*
Expand Down Expand Up @@ -252,7 +266,10 @@ public function setValueExplicit($pValue = null, $pDataType = PHPExcel_Cell_Data

// set the datatype
$this->dataType = $pDataType;


// set the original value as a string
$this->_originalValue = (string) $pValue;

return $this->notifyCacheController();
}

Expand Down