30 if (!
defined(
'PHPEXCEL_ROOT')) {
34 define(
'PHPEXCEL_ROOT', dirname(__FILE__) .
'/../../');
35 require(PHPEXCEL_ROOT .
'PHPExcel/Autoloader.php');
58 if (is_string($value)) {
60 } elseif (is_object($value)) {
62 if ($value instanceof DateTime) {
63 $value = $value->format(
'Y-m-d H:i:s');
84 if ($pValue === null) {
86 } elseif ($pValue ===
'') {
90 } elseif ($pValue{0} ===
'=' && strlen($pValue) > 1) {
92 } elseif (is_bool($pValue)) {
94 } elseif (is_float($pValue) || is_int($pValue)) {
96 } elseif (preg_match(
'/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) {
97 $tValue = ltrim($pValue,
'+-');
98 if (is_string($pValue) && $tValue{0} ===
'0' && strlen($tValue) > 1 && $tValue{1} !==
'.' ) {
100 } elseif((strpos($pValue,
'.') ===
false) && ($pValue > PHP_INT_MAX)) {
Add rich text string
The name of the decorator.
static dataTypeForValue($pValue=null)
DataType for value.
setValueExplicit($pValue=NULL, $pDataType=PHPExcel_Cell_DataType::TYPE_STRING)
Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the ...
static getErrorCodes()
Get list of error codes.
bindValue(PHPExcel_Cell $cell, $value=null)
Bind value to a cell.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
static SanitizeUTF8($value)
Try to sanitize UTF8, stripping invalid byte sequences.