diff --git a/Classes/PHPExcel/Calculation/MathTrig.php b/Classes/PHPExcel/Calculation/MathTrig.php index b2bb19d4..9f0e7f4c 100644 --- a/Classes/PHPExcel/Calculation/MathTrig.php +++ b/Classes/PHPExcel/Calculation/MathTrig.php @@ -880,9 +880,9 @@ class PHPExcel_Calculation_MathTrig { $max = PHPExcel_Calculation_Functions::flattenSingleValue($max); if ($min == 0 && $max == 0) { - return (rand(0,10000000)) / 10000000; + return (mt_rand(0,10000000)) / 10000000; } else { - return rand($min, $max); + return mt_rand($min, $max); } } // function RAND() diff --git a/Examples/13calculation.php b/Examples/13calculation.php index db149489..01e63ea7 100644 --- a/Examples/13calculation.php +++ b/Examples/13calculation.php @@ -34,6 +34,7 @@ date_default_timezone_set('Europe/London'); define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
'); date_default_timezone_set('Europe/London'); +mt_srand(1234567890); /** Include PHPExcel */ require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; diff --git a/Examples/runall.php b/Examples/runall.php index c65727eb..3818547a 100644 --- a/Examples/runall.php +++ b/Examples/runall.php @@ -59,6 +59,7 @@ $aTests = array( , '11documentsecurity-xls.php' , '12cellProtection.php' , '13calculation.php' + , '13calculationCyclicFormulae.php' , '14excel5.php' , '15datavalidation.php' , '15datavalidation-xls.php'