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*15ٗ&5UEk V$EM~#%d[H@:^,ȺoaܗzSYȳ$'`)+wI&3 I]C63O3tQ%`ߌ;뱎0_C&A[lJs`}XF#Jph1Z0אe=EC}[FVn m҆شT\؅ ON"A~ )DqQ#nvBgAyҰ; 7Ȑ?+tPQ8F̨dh򀱫9>f&3 I]C63f v[k|yhHONHإG & ZN Dfͥ7%}0aZ$'Ç!q+g ~$,'n0ժnk`#XjAX5Me]T]tc=4sɇ̮z2hL7E @@M1a[CHbs)>N[KP0<݂1` Z&: g3jg:~K cOUÈ+u\R3z2ix?Uc`$G(xI2Vhpc Nŵ͏iqrnD ) GFZq_Kw %` .3jg:~K cOUÈ쉗ړ #pbxWF[Mu tCU1Y+ Tt߈ĈR ͌ ^9c60QM<2UJ3Iz2E;9^%D/Hk8[zsqAC ^Vhѿ,Co~_IC* aP]gSJ?FH!wT#G~eO{r (,& YX}bJ5/G+MF17nbV&܀[Z^' p3wGUwq)r0#Q38|sL֙%6؟& v[} %;]!Q%{RHX KQÿ@z[_h?$1^kT*X3f@EjM@ /ڒ+8ɯAsOVJR)M 8B#>_6YyuO~aji|R\HUKU.s$!^_v>r(xH}K>kG/z7g/:aETION__], $value); } if (is_string($value)) { return false; } return is_numeric($value); } /** * IS_LOGICAL. * * @param mixed $value Value to check * Or can be an array of values * * @return array|bool * If an array of numbers is passed as an argument, then the returned result will also be an array * with the same dimensions */ public static function isLogical($value = null) { if (is_array($value)) { return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); } return is_bool($value); } /** * IS_TEXT. * * @param mixed $value Value to check * Or can be an array of values * * @return array|bool * If an array of numbers is passed as an argument, then the returned result will also be an array * with the same dimensions */ public static function isText($value = null) { if (is_array($value)) { return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); } return is_string($value) && !ErrorValue::isError($value); } /** * IS_NONTEXT. * * @param mixed $value Value to check * Or can be an array of values * * @return array|bool * If an array of numbers is passed as an argument, then the returned result will also be an array * with the same dimensions */ public static function isNonText($value = null) { if (is_array($value)) { return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); } return !self::isText($value); } /** * ISFORMULA. * * @param mixed $cellReference The cell to check * @param ?Cell $cell The current cell (containing this formula) * * @return array|bool|string */ public static function isFormula($cellReference = '', ?Cell $cell = null) { if ($cell === null) { return ExcelError::REF(); } $fullCellReference = Functions::expandDefinedName((string) $cellReference, $cell); if (strpos($cellReference, '!') !== false) { $cellReference = Functions::trimSheetFromCellReference($cellReference); $cellReferences = Coordinate::extractAllCellReferencesInRange($cellReference); if (count($cellReferences) > 1) { return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $cellReferences, $cell); } } $fullCellReference = Functions::trimTrailingRange($fullCellReference); preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $fullCellReference, $matches); $fullCellReference = $matches[6] . $matches[7]; $worksheetName = str_replace("''", "'", trim($matches[2], "'")); $worksheet = (!empty($worksheetName)) ? $cell->getWorksheet()->getParentOrThrow()->getSheetByName($worksheetName) : $cell->getWorksheet(); return ($worksheet !== null) ? $worksheet->getCell($fullCellReference)->isFormula() : ExcelError::REF(); } /** * N. * * Returns a value converted to a number * * @param null|mixed $value The value you want converted * * @return number|string N converts values listed in the following table * If value is or refers to N returns * A number That number value * A date The Excel serialized number of that date * TRUE 1 * FALSE 0 * An error value The error value * Anything else 0 */ public static function asNumber($value = null) { while (is_array($value)) { $value = array_shift($value); } switch (gettype($value)) { case 'double': case 'float': case 'integer': return $value; case 'boolean': return (int) $value; case 'string': // Errors if ((strlen($value) > 0) && ($value[0] == '#')) { return $value; } break; } return 0; } /** * TYPE. * * Returns a number that identifies the type of a value * * @param null|mixed $value The value you want tested * * @return number N converts values listed in the following table * If value is or refers to N returns * A number 1 * Text 2 * Logical Value 4 * An error value 16 * Array or Matrix 64 */ public static function type($value = null) { $value = Functions::flattenArrayIndexed($value); if (is_array($value) && (count($value) > 1)) { end($value); $a = key($value); // Range of cells is an error if (Functions::isCellValue($a)) { return 16; // Test for Matrix } elseif (Functions::isMatrixValue($a)) { return 64; } } elseif (empty($value)) { // Empty Cell return 1; } $value = Functions::flattenSingleValue($value); if (($value === null) || (is_float($value)) || (is_int($value))) { return 1; } elseif (is_bool($value)) { return 4; } elseif (is_array($value)) { return 64; } elseif (is_string($value)) { // Errors if ((strlen($value) > 0) && ($value[0] == '#')) { return 16; } return 2; } return 0; } }