private static function nbrConversionFormat($xVal, $places)
    {
        if (!is_null($places)) {
            if (strlen($xVal) <= $places) {
                return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10);
            } else {
                return PHPExcel_Calculation_Functions::NaN();
            }
        }

        return substr($xVal, -10);
    }
private static function nbrConversionFormat($xVal, $places)
    {
        if (!is_null($places)) {
            if (strlen($xVal) <= $places) {
                return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10);
            } else {
                return PHPExcel_Calculation_Functions::NaN();
            }
        }

        return substr($xVal, -10);
    }
private static function nbrConversionFormat ( $ xVal , $ places ) { if ( ! is_null ( $ places ) ) { if ( strlen ( $ xVal ) <= $ places ) { return substr ( str_pad ( $ xVal , $ places , '0' , STR_PAD_LEFT ) , - 10 ) ; } else { return PHPExcel_Calculation_Functions :: NaN ( ) ; } } return substr ( $ xVal , - 10 ) ; }
Formats a number base string value with leading zeroes

@param    string        $xVal        The "number" to pad
@param    integer        $places        The length that we want to pad this value
@return    string        The padded "number"
Formats a number base string value with leading zeroes