You are here

public static function PHPExcel_Calculation::_unwrapResult in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php \PHPExcel_Calculation::_unwrapResult()

* Remove quotes used as a wrapper to identify string values * *

Parameters

mixed $value: * @return mixed

8 calls to PHPExcel_Calculation::_unwrapResult()
PHPExcel_Calculation::calculateCellValue in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
* Calculate the value of a cell formula * * @access public *
PHPExcel_Calculation::calculateFormula in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
* Calculate the value of a formula * *
PHPExcel_Calculation::_executeBinaryComparisonOperation in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
PHPExcel_Calculation::_parseFormula in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
PHPExcel_Calculation::_processTokenStack in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php, line 2187

Class

PHPExcel_Calculation
PHPExcel_Calculation (Multiton)

Code

public static function _unwrapResult($value) {
  if (is_string($value)) {
    if (isset($value[0]) && $value[0] == '"' && substr($value, -1) == '"') {
      return substr($value, 1, -1);
    }

    //	Convert numeric errors to NaN error
  }
  else {
    if (is_float($value) && (is_nan($value) || is_infinite($value))) {
      return PHPExcel_Calculation_Functions::NaN();
    }
  }
  return $value;
}