public static function PHPExcel_Calculation_Statistical::MAX in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php \PHPExcel_Calculation_Statistical::MAX()
* MAX * * MAX returns the value of the element of the values passed that has the highest value, * with negative numbers considered smaller than positive numbers. * * Excel Function: * MAX(value1[,value2[, ...]]) * * @access public * @category Statistical Functions *
Parameters
mixed $arg,... Data values: * @return float
2 calls to PHPExcel_Calculation_Statistical::MAX()
- PHPExcel_Calculation_Database::DMAX in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Database.php - * DMAX * * Returns the largest number in a column of a list or database that matches conditions you that * specify. * * Excel Function: * DMAX(database,field,criteria) * * @access public * @category Database Functions *
- PHPExcel_Calculation_MathTrig::SUBTOTAL in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ MathTrig.php - * SUBTOTAL * * Returns a subtotal in a list or database. * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Statistical.php, line 2129
Class
- PHPExcel_Calculation_Statistical
- PHPExcel_Calculation_Statistical
Code
public static function MAX() {
// Return value
$returnValue = null;
// Loop through arguments
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
foreach ($aArgs as $arg) {
// Is it a numeric value?
if (is_numeric($arg) && !is_string($arg)) {
if (is_null($returnValue) || $arg > $returnValue) {
$returnValue = $arg;
}
}
}
// Return
if (is_null($returnValue)) {
return 0;
}
return $returnValue;
}