ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Calculation_TextData Class Reference
+ Collaboration diagram for PHPExcel_Calculation_TextData:

Static Public Member Functions

static CHARACTER ($character)
 CHARACTER. More...
 
static TRIMNONPRINTABLE ($stringValue='')
 TRIMNONPRINTABLE. More...
 
static TRIMSPACES ($stringValue='')
 TRIMSPACES. More...
 
static ASCIICODE ($characters)
 ASCIICODE. More...
 
static CONCATENATE ()
 CONCATENATE. More...
 
static DOLLAR ($value=0, $decimals=2)
 DOLLAR. More...
 
static SEARCHSENSITIVE ($needle, $haystack, $offset=1)
 SEARCHSENSITIVE. More...
 
static SEARCHINSENSITIVE ($needle, $haystack, $offset=1)
 SEARCHINSENSITIVE. More...
 
static FIXEDFORMAT ($value, $decimals=2, $no_commas=FALSE)
 FIXEDFORMAT. More...
 
static LEFT ($value='', $chars=1)
 LEFT. More...
 
static MID ($value='', $start=1, $chars=null)
 MID. More...
 
static RIGHT ($value='', $chars=1)
 RIGHT. More...
 
static STRINGLENGTH ($value='')
 STRINGLENGTH. More...
 
static LOWERCASE ($mixedCaseString)
 LOWERCASE. More...
 
static UPPERCASE ($mixedCaseString)
 UPPERCASE. More...
 
static PROPERCASE ($mixedCaseString)
 PROPERCASE. More...
 
static REPLACE ($oldText='', $start=1, $chars=null, $newText)
 REPLACE. More...
 
static SUBSTITUTE ($text='', $fromText='', $toText='', $instance=0)
 SUBSTITUTE. More...
 
static RETURNSTRING ($testValue='')
 RETURNSTRING. More...
 
static TEXTFORMAT ($value, $format)
 TEXTFORMAT. More...
 
static VALUE ($value='')
 VALUE. More...
 

Static Private Member Functions

static _uniord ($c)
 

Static Private Attributes

static $_invalidChars = Null
 

Detailed Description

Definition at line 46 of file TextData.php.

Member Function Documentation

◆ _uniord()

static PHPExcel_Calculation_TextData::_uniord (   $c)
staticprivate

Definition at line 50 of file TextData.php.

50 {
51 if (ord($c{0}) >=0 && ord($c{0}) <= 127)
52 return ord($c{0});
53 if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
54 return (ord($c{0})-192)*64 + (ord($c{1})-128);
55 if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
56 return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
57 if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
58 return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
59 if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
60 return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
61 if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
62 return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
63 if (ord($c{0}) >= 254 && ord($c{0}) <= 255) //error
65 return 0;
66 } // function _uniord()

References PHPExcel_Calculation_Functions\VALUE().

Referenced by ASCIICODE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ASCIICODE()

static PHPExcel_Calculation_TextData::ASCIICODE (   $characters)
static

ASCIICODE.

Parameters
string$charactersValue
Returns
int

Definition at line 138 of file TextData.php.

138 {
139 if (($characters === NULL) || ($characters === ''))
142 if (is_bool($characters)) {
144 $characters = (int) $characters;
145 } else {
146 $characters = ($characters) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
147 }
148 }
149
150 $character = $characters;
151 if ((function_exists('mb_strlen')) && (function_exists('mb_substr'))) {
152 if (mb_strlen($characters, 'UTF-8') > 1) { $character = mb_substr($characters, 0, 1, 'UTF-8'); }
153 return self::_uniord($character);
154 } else {
155 if (strlen($characters) > 0) { $character = substr($characters, 0, 1); }
156 return ord($character);
157 }
158 } // function ASCIICODE()
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
Definition: Functions.php:662
static getFALSE()
Return the locale-specific translation of FALSE.
static getTRUE()
Return the locale-specific translation of TRUE.

References _uniord(), PHPExcel_Calculation_Functions\COMPATIBILITY_OPENOFFICE, PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation_Functions\getCompatibilityMode(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

◆ CHARACTER()

static PHPExcel_Calculation_TextData::CHARACTER (   $character)
static

CHARACTER.

Parameters
string$characterValue
Returns
int

Definition at line 74 of file TextData.php.

74 {
76
77 if ((!is_numeric($character)) || ($character < 0)) {
79 }
80
81 if (function_exists('mb_convert_encoding')) {
82 return mb_convert_encoding('&#'.intval($character).';', 'UTF-8', 'HTML-ENTITIES');
83 } else {
84 return chr(intval($character));
85 }
86 }

References PHPExcel_Calculation_Functions\flattenSingleValue(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

◆ CONCATENATE()

static PHPExcel_Calculation_TextData::CONCATENATE ( )
static

CONCATENATE.

Returns
string

Definition at line 166 of file TextData.php.

166 {
167 // Return value
168 $returnValue = '';
169
170 // Loop through arguments
171 $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
172 foreach ($aArgs as $arg) {
173 if (is_bool($arg)) {
175 $arg = (int) $arg;
176 } else {
178 }
179 }
180 $returnValue .= $arg;
181 }
182
183 // Return
184 return $returnValue;
185 } // function CONCATENATE()
static flattenArray($array)
Convert a multi-dimensional array to a simple 1-dimensional array.
Definition: Functions.php:598

References PHPExcel_Calculation_Functions\COMPATIBILITY_OPENOFFICE, PHPExcel_Calculation_Functions\flattenArray(), PHPExcel_Calculation_Functions\getCompatibilityMode(), PHPExcel_Calculation\getFALSE(), and PHPExcel_Calculation\getTRUE().

+ Here is the call graph for this function:

◆ DOLLAR()

static PHPExcel_Calculation_TextData::DOLLAR (   $value = 0,
  $decimals = 2 
)
static

DOLLAR.

This function converts a number to text using currency format, with the decimals rounded to the specified place. The format used is $#,##0.00_);($#,##0.00)..

Parameters
float$valueThe value to format
int$decimalsThe number of digits to display to the right of the decimal point. If decimals is negative, number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2
Returns
string

Definition at line 200 of file TextData.php.

200 {
202 $decimals = is_null($decimals) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($decimals);
203
204 // Validate parameters
205 if (!is_numeric($value) || !is_numeric($decimals)) {
207 }
208 $decimals = floor($decimals);
209
210 $mask = '$#,##0';
211 if ($decimals > 0) {
212 $mask .= '.' . str_repeat('0',$decimals);
213 } else {
214 $round = pow(10,abs($decimals));
215 if ($value < 0) { $round = 0-$round; }
216 $value = PHPExcel_Calculation_MathTrig::MROUND($value, $round);
217 }
218
220
221 } // function DOLLAR()
static MROUND($number, $multiple)
MROUND.
Definition: MathTrig.php:686
static toFormattedString($value='0', $format=PHPExcel_Style_NumberFormat::FORMAT_GENERAL, $callBack=null)
Convert a value in a pre-defined format to a PHP string.
$mask
Definition: example_042.php:90

References $mask, PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation_MathTrig\MROUND(), PHPExcel_Calculation_Functions\NaN(), and PHPExcel_Style_NumberFormat\toFormattedString().

+ Here is the call graph for this function:

◆ FIXEDFORMAT()

static PHPExcel_Calculation_TextData::FIXEDFORMAT (   $value,
  $decimals = 2,
  $no_commas = FALSE 
)
static

FIXEDFORMAT.

Parameters
mixed$valueValue to check
integer$decimals
boolean$no_commas
Returns
boolean

Definition at line 304 of file TextData.php.

304 {
308
309 // Validate parameters
310 if (!is_numeric($value) || !is_numeric($decimals)) {
312 }
313 $decimals = floor($decimals);
314
315 $valueResult = round($value,$decimals);
316 if ($decimals < 0) { $decimals = 0; }
317 if (!$no_commas) {
318 $valueResult = number_format($valueResult,$decimals);
319 }
320
321 return (string) $valueResult;
322 } // function FIXEDFORMAT()

References PHPExcel_Calculation_Functions\flattenSingleValue(), and PHPExcel_Calculation_Functions\NaN().

+ Here is the call graph for this function:

◆ LEFT()

static PHPExcel_Calculation_TextData::LEFT (   $value = '',
  $chars = 1 
)
static

LEFT.

Parameters
string$valueValue
int$charsNumber of characters
Returns
string

Definition at line 332 of file TextData.php.

332 {
335
336 if ($chars < 0) {
338 }
339
340 if (is_bool($value)) {
342 }
343
344 if (function_exists('mb_substr')) {
345 return mb_substr($value, 0, $chars, 'UTF-8');
346 } else {
347 return substr($value, 0, $chars);
348 }
349 } // function LEFT()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

Referenced by REPLACE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LOWERCASE()

static PHPExcel_Calculation_TextData::LOWERCASE (   $mixedCaseString)
static

LOWERCASE.

Converts a string value to upper case.

Parameters
string$mixedCaseString
Returns
string

Definition at line 437 of file TextData.php.

437 {
438 $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
439
440 if (is_bool($mixedCaseString)) {
441 $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
442 }
443
444 return PHPExcel_Shared_String::StrToLower($mixedCaseString);
445 } // function LOWERCASE()
static StrToLower($pValue='')
Convert a UTF-8 encoded string to lower case.
Definition: String.php:606

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Shared_String\StrToLower().

+ Here is the call graph for this function:

◆ MID()

static PHPExcel_Calculation_TextData::MID (   $value = '',
  $start = 1,
  $chars = null 
)
static

MID.

Parameters
string$valueValue
int$startStart character
int$charsNumber of characters
Returns
string

Definition at line 360 of file TextData.php.

360 {
364
365 if (($start < 1) || ($chars < 0)) {
367 }
368
369 if (is_bool($value)) {
371 }
372
373 if (function_exists('mb_substr')) {
374 return mb_substr($value, --$start, $chars, 'UTF-8');
375 } else {
376 return substr($value, --$start, $chars);
377 }
378 } // function MID()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

◆ PROPERCASE()

static PHPExcel_Calculation_TextData::PROPERCASE (   $mixedCaseString)
static

PROPERCASE.

Converts a string value to upper case.

Parameters
string$mixedCaseString
Returns
string

Definition at line 475 of file TextData.php.

475 {
476 $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
477
478 if (is_bool($mixedCaseString)) {
479 $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
480 }
481
482 return PHPExcel_Shared_String::StrToTitle($mixedCaseString);
483 } // function PROPERCASE()
static StrToTitle($pValue='')
Convert a UTF-8 encoded string to title/proper case (uppercase every first character in each word,...
Definition: String.php:621

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Shared_String\StrToTitle().

+ Here is the call graph for this function:

◆ REPLACE()

static PHPExcel_Calculation_TextData::REPLACE (   $oldText = '',
  $start = 1,
  $chars = null,
  $newText 
)
static

REPLACE.

Parameters
string$oldTextString to modify
int$startStart character
int$charsNumber of characters
string$newTextString to replace in defined position
Returns
string

Definition at line 495 of file TextData.php.

495 {
500
501 $left = self::LEFT($oldText,$start-1);
502 $right = self::RIGHT($oldText,self::STRINGLENGTH($oldText)-($start+$chars)+1);
503
504 return $left.$newText.$right;
505 } // function REPLACE()
static RIGHT($value='', $chars=1)
RIGHT.
Definition: TextData.php:388
static LEFT($value='', $chars=1)
LEFT.
Definition: TextData.php:332

References PHPExcel_Calculation_Functions\flattenSingleValue(), LEFT(), and RIGHT().

Referenced by SUBSTITUTE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RETURNSTRING()

static PHPExcel_Calculation_TextData::RETURNSTRING (   $testValue = '')
static

RETURNSTRING.

Parameters
mixed$testValueValue to check
Returns
boolean

Definition at line 561 of file TextData.php.

561 {
563
564 if (is_string($testValue)) {
565 return $testValue;
566 }
567 return Null;
568 } // function RETURNSTRING()

References PHPExcel_Calculation_Functions\flattenSingleValue().

+ Here is the call graph for this function:

◆ RIGHT()

static PHPExcel_Calculation_TextData::RIGHT (   $value = '',
  $chars = 1 
)
static

RIGHT.

Parameters
string$valueValue
int$charsNumber of characters
Returns
string

Definition at line 388 of file TextData.php.

388 {
391
392 if ($chars < 0) {
394 }
395
396 if (is_bool($value)) {
398 }
399
400 if ((function_exists('mb_substr')) && (function_exists('mb_strlen'))) {
401 return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8');
402 } else {
403 return substr($value, strlen($value) - $chars);
404 }
405 } // function RIGHT()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

Referenced by REPLACE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SEARCHINSENSITIVE()

static PHPExcel_Calculation_TextData::SEARCHINSENSITIVE (   $needle,
  $haystack,
  $offset = 1 
)
static

SEARCHINSENSITIVE.

Parameters
string$needleThe string to look for
string$haystackThe string in which to look
int$offsetOffset within $haystack
Returns
string

Definition at line 268 of file TextData.php.

268 {
272
273 if (!is_bool($needle)) {
274 if (is_bool($haystack)) {
276 }
277
278 if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) {
279 if (PHPExcel_Shared_String::CountCharacters($needle) == 0) {
280 return $offset;
281 }
282 if (function_exists('mb_stripos')) {
283 $pos = mb_stripos($haystack, $needle, --$offset,'UTF-8');
284 } else {
285 $pos = stripos($haystack, $needle, --$offset);
286 }
287 if ($pos !== false) {
288 return ++$pos;
289 }
290 }
291 }
293 } // function SEARCHINSENSITIVE()
static CountCharacters($value, $enc='UTF-8')
Get character count.
Definition: String.php:550

References PHPExcel_Shared_String\CountCharacters(), PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

◆ SEARCHSENSITIVE()

static PHPExcel_Calculation_TextData::SEARCHSENSITIVE (   $needle,
  $haystack,
  $offset = 1 
)
static

SEARCHSENSITIVE.

Parameters
string$needleThe string to look for
string$haystackThe string in which to look
int$offsetOffset within $haystack
Returns
string

Definition at line 232 of file TextData.php.

232 {
236
237 if (!is_bool($needle)) {
238 if (is_bool($haystack)) {
240 }
241
242 if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) {
243 if (PHPExcel_Shared_String::CountCharacters($needle) == 0) {
244 return $offset;
245 }
246 if (function_exists('mb_strpos')) {
247 $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');
248 } else {
249 $pos = strpos($haystack, $needle, --$offset);
250 }
251 if ($pos !== false) {
252 return ++$pos;
253 }
254 }
255 }
257 } // function SEARCHSENSITIVE()

References PHPExcel_Shared_String\CountCharacters(), PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

◆ STRINGLENGTH()

static PHPExcel_Calculation_TextData::STRINGLENGTH (   $value = '')
static

STRINGLENGTH.

Parameters
string$valueValue
Returns
string

Definition at line 414 of file TextData.php.

414 {
416
417 if (is_bool($value)) {
419 }
420
421 if (function_exists('mb_strlen')) {
422 return mb_strlen($value, 'UTF-8');
423 } else {
424 return strlen($value);
425 }
426 } // function STRINGLENGTH()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), and PHPExcel_Calculation\getTRUE().

+ Here is the call graph for this function:

◆ SUBSTITUTE()

static PHPExcel_Calculation_TextData::SUBSTITUTE (   $text = '',
  $fromText = '',
  $toText = '',
  $instance = 0 
)
static

SUBSTITUTE.

Parameters
string$textValue
string$fromTextFrom Value
string$toTextTo Value
integer$instanceInstance Number
Returns
string

Definition at line 517 of file TextData.php.

517 {
521 $instance = floor(PHPExcel_Calculation_Functions::flattenSingleValue($instance));
522
523 if ($instance == 0) {
524 if(function_exists('mb_str_replace')) {
525 return mb_str_replace($fromText,$toText,$text);
526 } else {
527 return str_replace($fromText,$toText,$text);
528 }
529 } else {
530 $pos = -1;
531 while($instance > 0) {
532 if (function_exists('mb_strpos')) {
533 $pos = mb_strpos($text, $fromText, $pos+1, 'UTF-8');
534 } else {
535 $pos = strpos($text, $fromText, $pos+1);
536 }
537 if ($pos === false) {
538 break;
539 }
540 --$instance;
541 }
542 if ($pos !== false) {
543 if (function_exists('mb_strlen')) {
544 return self::REPLACE($text,++$pos,mb_strlen($fromText, 'UTF-8'),$toText);
545 } else {
546 return self::REPLACE($text,++$pos,strlen($fromText),$toText);
547 }
548 }
549 }
550
551 return $text;
552 } // function SUBSTITUTE()
static REPLACE($oldText='', $start=1, $chars=null, $newText)
REPLACE.
Definition: TextData.php:495
$text
Definition: errorreport.php:18

References $text, PHPExcel_Calculation_Functions\flattenSingleValue(), and REPLACE().

+ Here is the call graph for this function:

◆ TEXTFORMAT()

static PHPExcel_Calculation_TextData::TEXTFORMAT (   $value,
  $format 
)
static

TEXTFORMAT.

Parameters
mixed$valueValue to check
string$formatFormat mask to use
Returns
boolean

Definition at line 578 of file TextData.php.

578 {
581
582 if ((is_string($value)) && (!is_numeric($value)) && PHPExcel_Shared_Date::isDateTimeFormatCode($format)) {
584 }
585
587 } // function TEXTFORMAT()
static DATEVALUE($dateValue=1)
Definition: DateTime.php:481
static isDateTimeFormatCode($pFormatCode='')
Is a given number format code a date/time?
Definition: Date.php:282
$format
Definition: metadata.php:141

References $format, PHPExcel_Calculation_DateTime\DATEVALUE(), PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Shared_Date\isDateTimeFormatCode(), and PHPExcel_Style_NumberFormat\toFormattedString().

+ Here is the call graph for this function:

◆ TRIMNONPRINTABLE()

static PHPExcel_Calculation_TextData::TRIMNONPRINTABLE (   $stringValue = '')
static

TRIMNONPRINTABLE.

Parameters
mixed$stringValueValue to check
Returns
string

Definition at line 95 of file TextData.php.

95 {
96 $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
97
98 if (is_bool($stringValue)) {
99 return ($stringValue) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
100 }
101
102 if (self::$_invalidChars == Null) {
103 self::$_invalidChars = range(chr(0),chr(31));
104 }
105
106 if (is_string($stringValue) || is_numeric($stringValue)) {
107 return str_replace(self::$_invalidChars, '', trim($stringValue, "\x00..\x1F"));
108 }
109 return NULL;
110 } // function TRIMNONPRINTABLE()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), and PHPExcel_Calculation\getTRUE().

+ Here is the call graph for this function:

◆ TRIMSPACES()

static PHPExcel_Calculation_TextData::TRIMSPACES (   $stringValue = '')
static

TRIMSPACES.

Parameters
mixed$stringValueValue to check
Returns
string

Definition at line 119 of file TextData.php.

119 {
120 $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
121 if (is_bool($stringValue)) {
122 return ($stringValue) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
123 }
124
125 if (is_string($stringValue) || is_numeric($stringValue)) {
126 return trim(preg_replace('/ +/',' ',trim($stringValue, ' ')), ' ');
127 }
128 return NULL;
129 } // function TRIMSPACES()

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), and PHPExcel_Calculation\getTRUE().

+ Here is the call graph for this function:

◆ UPPERCASE()

static PHPExcel_Calculation_TextData::UPPERCASE (   $mixedCaseString)
static

UPPERCASE.

Converts a string value to upper case.

Parameters
string$mixedCaseString
Returns
string

Definition at line 456 of file TextData.php.

456 {
457 $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
458
459 if (is_bool($mixedCaseString)) {
460 $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
461 }
462
463 return PHPExcel_Shared_String::StrToUpper($mixedCaseString);
464 } // function UPPERCASE()
static StrToUpper($pValue='')
Convert a UTF-8 encoded string to upper case.
Definition: String.php:592

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Shared_String\StrToUpper().

+ Here is the call graph for this function:

◆ VALUE()

static PHPExcel_Calculation_TextData::VALUE (   $value = '')
static

VALUE.

Parameters
mixed$valueValue to check
Returns
boolean

Definition at line 595 of file TextData.php.

595 {
597
598 if (!is_numeric($value)) {
599 $numberValue = str_replace(
601 '',
602 trim($value, " \t\n\r\0\x0B" . PHPExcel_Shared_String::getCurrencyCode())
603 );
604 if (is_numeric($numberValue)) {
605 return (float) $numberValue;
606 }
607
610
611 if (strpos($value, ':') !== false) {
612 $timeValue = PHPExcel_Calculation_DateTime::TIMEVALUE($value);
613 if ($timeValue !== PHPExcel_Calculation_Functions::VALUE()) {
615 return $timeValue;
616 }
617 }
618 $dateValue = PHPExcel_Calculation_DateTime::DATEVALUE($value);
619 if ($dateValue !== PHPExcel_Calculation_Functions::VALUE()) {
621 return $dateValue;
622 }
624
626 }
627 return (float) $value;
628 }
static TIMEVALUE($timeValue)
Definition: DateTime.php:583
static setReturnDateType($returnDateType)
Definition: Functions.php:155
static getCurrencyCode()
Definition: String.php:751
static getThousandsSeparator()
Get the thousands separator.
Definition: String.php:719

References PHPExcel_Calculation_DateTime\DATEVALUE(), PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Shared_String\getCurrencyCode(), PHPExcel_Calculation_Functions\getReturnDateType(), PHPExcel_Shared_String\getThousandsSeparator(), PHPExcel_Calculation_Functions\RETURNDATE_EXCEL, PHPExcel_Calculation_Functions\setReturnDateType(), PHPExcel_Calculation_DateTime\TIMEVALUE(), and PHPExcel_Calculation_Functions\VALUE().

+ Here is the call graph for this function:

Field Documentation

◆ $_invalidChars

PHPExcel_Calculation_TextData::$_invalidChars = Null
staticprivate

Definition at line 48 of file TextData.php.


The documentation for this class was generated from the following file: