芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/public_html/panel/excel/Classes/PHPExcel/Cell/DefaultValueBinder.php
setValueExplicit( $value, self::dataTypeForValue($value) ); // Done! return TRUE; } /** * DataType for value * * @param mixed $pValue * @return string */ public static function dataTypeForValue($pValue = null) { // Match the value against a few data types if (is_null($pValue)) { return PHPExcel_Cell_DataType::TYPE_NULL; } elseif ($pValue === '') { return PHPExcel_Cell_DataType::TYPE_STRING; } elseif ($pValue instanceof PHPExcel_RichText) { return PHPExcel_Cell_DataType::TYPE_INLINE; } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { return PHPExcel_Cell_DataType::TYPE_FORMULA; } elseif (is_bool($pValue)) { return PHPExcel_Cell_DataType::TYPE_BOOL; } elseif (is_float($pValue) || is_int($pValue)) { return PHPExcel_Cell_DataType::TYPE_NUMERIC; } elseif (preg_match('/^\-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)$/', $pValue)) { return PHPExcel_Cell_DataType::TYPE_NUMERIC; } elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) { return PHPExcel_Cell_DataType::TYPE_ERROR; } else { return PHPExcel_Cell_DataType::TYPE_STRING; } } }