You are here

public static function PHPExcel_Calculation_Statistical::COUNT in Loft Data Grids 7.2

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

* COUNT * * Counts the number of cells that contain numbers within the list of arguments * * Excel Function: * COUNT(value1[,value2[, ...]]) * * @access public * @category Statistical Functions *

Parameters

mixed $arg,... Data values: * @return int

7 calls to PHPExcel_Calculation_Statistical::COUNT()
PHPExcel_Calculation_Database::DCOUNT in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Database.php
* DCOUNT * * Counts the cells that contain numbers in a column of a list or database that match conditions * that you specify. * * Excel Function: * DCOUNT(database,[field],criteria) * * Excel Function: …
PHPExcel_Calculation_MathTrig::SUBTOTAL in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php
* SUBTOTAL * * Returns a subtotal in a list or database. * *
PHPExcel_Calculation_Statistical::GEOMEAN in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php
* GEOMEAN * * Returns the geometric mean of an array or range of positive data. For example, you * can use GEOMEAN to calculate average growth rate given compound interest with * variable rates. * * Excel Function: …
PHPExcel_Calculation_Statistical::LARGE in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php
* LARGE * * Returns the nth largest value in a data set. You can use this function to * select a value based on its relative standing. * * Excel Function: * LARGE(value1[,value2[, ...]],entry) * * @access public * @category…
PHPExcel_Calculation_Statistical::PERCENTILE in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php
* PERCENTILE * * Returns the nth percentile of values in a range.. * * Excel Function: * PERCENTILE(value1[,value2[, ...]],entry) * * @access public * @category Statistical Functions *

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php, line 1165

Class

PHPExcel_Calculation_Statistical
PHPExcel_Calculation_Statistical

Code

public static function COUNT() {

  // Return value
  $returnValue = 0;

  // Loop through arguments
  $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args());
  foreach ($aArgs as $k => $arg) {
    if (is_bool($arg) && (!PHPExcel_Calculation_Functions::isCellValue($k) || PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE)) {
      $arg = (int) $arg;
    }

    // Is it a numeric value?
    if (is_numeric($arg) && !is_string($arg)) {
      ++$returnValue;
    }
  }

  // Return
  return $returnValue;
}