protected function formatNumericCellValue($nodeValue, $cellStyleId)
    {
        // Numeric values can represent numbers as well as timestamps.
        // We need to look at the style of the cell to determine whether it is one or the other.
        $shouldFormatAsDate = $this->styleHelper->shouldFormatNumericValueAsDate($cellStyleId);

        if ($shouldFormatAsDate) {
            return $this->formatExcelTimestampValue(floatval($nodeValue), $cellStyleId);
        } else {
            $nodeIntValue = intval($nodeValue);
            return ($nodeIntValue == $nodeValue) ? $nodeIntValue : floatval($nodeValue);
        }
    }
protected function formatNumericCellValue($nodeValue, $cellStyleId)
    {
        // Numeric values can represent numbers as well as timestamps.
        // We need to look at the style of the cell to determine whether it is one or the other.
        $shouldFormatAsDate = $this->styleHelper->shouldFormatNumericValueAsDate($cellStyleId);

        if ($shouldFormatAsDate) {
            return $this->formatExcelTimestampValue(floatval($nodeValue), $cellStyleId);
        } else {
            $nodeIntValue = intval($nodeValue);
            return ($nodeIntValue == $nodeValue) ? $nodeIntValue : floatval($nodeValue);
        }
    }
protected function formatNumericCellValue ( $ nodeValue , $ cellStyleId ) { // Numeric values can represent numbers as well as timestamps. // We need to look at the style of the cell to determine whether it is one or the other. $ shouldFormatAsDate = $ this -> styleHelper -> shouldFormatNumericValueAsDate ( $ cellStyleId ) ; if ( $ shouldFormatAsDate ) { return $ this -> formatExcelTimestampValue ( floatval ( $ nodeValue ) , $ cellStyleId ) ; } else { $ nodeIntValue = intval ( $ nodeValue ) ; return ( $ nodeIntValue == $ nodeValue ) ? $ nodeIntValue : floatval ( $ nodeValue ) ; } }
Returns the cell Numeric value from string of nodeValue.
The value can also represent a timestamp and a DateTime will be returned.

@param string $nodeValue
@param int $cellStyleId 0 being the default style
@return int|float|\DateTime|null The value associated with the cell
Returns the cell Numeric value from string of nodeValue . The value can also represent a timestamp and a DateTime will be returned .